Difference between revisions of "Template:Italic title prefixed/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Nullzero
imported>Andy M. Wang
(sync. this must have been de-luafied at some point)
 
Line 1: Line 1:
{{#invoke:Italic title/sandbox|italic_title_prefixed}}
+
<includeonly>{{DISPLAYTITLE:{{
 +
#switch:
 +
  {{#ifexpr: {{str find|{{PAGENAME}}|(}} != -1
 +
  | 1
 +
  | 0
 +
  }}{{#if: {{{force|}}}
 +
  | 1
 +
  | 0
 +
  }}{{str ≤ len|{{PAGENAME}}|49|1|0}}
 +
| 100 = {{
 +
  #if:{{NAMESPACE}}
 +
  | {{NAMESPACE}}:
 +
  }}{{#switch:{{PAGENAME}}
 +
  | {{{2}}} ({{{3|}}}) = ''{{{2}}}'' ({{{3|}}})
 +
  | {{{2}}} ({{{4|}}}) = ''{{{2}}}'' ({{{4|}}})
 +
  | {{{2}}} ({{{5|}}}) = ''{{{2}}}'' ({{{5|}}})
 +
  | {{{2}}} ({{{6|}}}) = ''{{{2}}}'' ({{{6|}}})
 +
  | {{{2}}} ({{{7|}}}) = ''{{{2}}}'' ({{{7|}}})
 +
  | #default = {{PAGENAME}}
 +
  }}
 +
 
 +
| 101 = {{
 +
  #if:{{NAMESPACE}}
 +
  | {{NAMESPACE}}:
 +
  }}{{Italics after|{{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}}|(}}-2}} }}|{{{1|0}}}}} {{str sub| {{PAGENAME}} | {{#expr: {{str find|{{PAGENAME}}|(}} - 1}} | {{#expr: {{str len|{{PAGENAME}}}} - {{str find|{{PAGENAME}}|(}} }} + 1 }}
 +
 
 +
| 010
 +
| 011
 +
| 110
 +
| 111
 +
| 001 = {{
 +
  #if:{{NAMESPACE}}
 +
  | {{NAMESPACE}}:
 +
  }}{{Italics after|{{PAGENAME}}|{{{1|0}}}}}
 +
 
 +
| 000 = {{FULLPAGENAME}}
 +
 
 +
}}}}</includeonly><noinclude>
 +
{{Documentation}}
 +
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 +
</noinclude>

Latest revision as of 01:43, 15 June 2016

Template documentation[view] [edit] [history] [purge]

This template works like {{Italic title}}, except that it contains a numerical parameter which causes a particular number of characters at the beginning of the title not to be italicized. (This is useful in ship articles, where the name of the ship should be italicized, but the prefix such as "HMS" should not.)

The next character after the prefix of the specified length must be a space.

Examples:

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Italic title prefixed

This template works like {{Italic title}}, except that it contains a numerical parameter which causes a particular number of characters at the beginning of the title not to be italicized.

Template parameters

ParameterDescriptionTypeStatus
Number of characters1

The number of characters not to be italicized. The next character after the prefix of the specified length must be a space.

Numberrequired