Permanently protected template

Difference between revisions of "Template:Main"

From Yugipedia
Jump to: navigation, search
(update based on my changes to {{See also}}; {{Documentation}})
Line 1: Line 1:
<noinclude>{{TagSyncPage}}
+
<div class="rellink">Main article{{ #if: {{{2|}}} | s }}: {{
</noinclude><includeonly><span class="box headnote">''Main article{{#if:{{{2|}}}|s}}&#58; {{#if:{{{1|}}}|{{#if:{{{l1|}}}|[[{{{1}}}|{{{l1|{{{1}}}}}}]]|[[{{{1}}}]]}}|'''Error: [[Template:Main|Template must be given at least one article name]]''' }}{{#if:{{{2|}}}
+
  #if: {{{1<includeonly>|</includeonly>}}}
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}{{#if:{{{l2|}}}|[[{{{2}}}|{{{l2|{{{2}}}}}}]]|[[{{{2}}}]]}}}}{{#if:{{{3|}}}
+
  | {{
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l3|}}}|[[{{{3}}}|{{{l3|{{{3}}}}}}]]|[[{{{3}}}]]}}}}{{#if:{{{4|}}}
+
    #if: {{ #pos: {{{1<noinclude>|[[foo]]</noinclude>}}} | {{!((}} }}
  |{{#if:{{{5|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l4|}}}|[[{{{4}}}|{{{l4|{{{4}}}}}}]]|[[{{{4}}}]]}}}}{{#if:{{{5|}}}
+
    | {{{1<noinclude>|[[Main Page]]</noinclude>}}}
  |{{#if:{{{6|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l5|}}}|[[{{{5}}}|{{{l5|{{{5}}}}}}]]|[[{{{5}}}]]}}}}{{#if:{{{6|}}}
+
    | [[{{{1}}}]]
  |{{#if:{{{7|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l6|}}}|[[{{{6}}}|{{{l6|{{{6}}}}}}]]|[[{{{6}}}]]}}}}{{#if:{{{7|}}}
+
  }}
  |{{#if:{{{8|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l7|}}}|[[{{{7}}}|{{{l7|{{{7}}}}}}]]|[[{{{7}}}]]}}}}{{#if:{{{8|}}}
+
  | '''Error: [[Template:Main|Template must be given at least one article name]]'''
  |{{#if:{{{9|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l8|}}}|[[{{{8}}}|{{{l8|{{{8}}}}}}]]|[[{{{8}}}]]}}}}{{#if:{{{9|}}}
+
}}{{
  |{{#if:{{{10|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l9|}}}|[[{{{9}}}|{{{l9|{{{9}}}}}}]]|[[{{{9}}}]]}}}}{{#if:{{{10|}}}
+
  #if: {{{2|}}} | {{
  |, and {{#if:{{{l10|}}}|[[{{{10}}}|{{{l10|{{{10}}}}}}]]|[[{{{10}}}]]}}}}''{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}</span></includeonly><noinclude>{{Tlx|Main}} is used below section titles to explain where the main article on the subject is.
+
    #if: {{{3|}}} | , | &nbsp;and
 
+
  }} {{ #if: {{ #pos: {{{2}}} | {{!((}} }} | {{{2}}} | [[{{{2}}}]] }}
==Usage==
+
}}{{
{{Tlx|Main|Article 1|3=l1=Article 1 Displaytitle|4=...|5=''Article 10''}}
+
  #if: {{{3|}}} | , {{
 
+
    #if: {{{4|}}} || and
* Up to 10 parameters are permitted: only the first is mandatory.
+
  }} {{ #if: {{ #pos: {{{3}}} | {{!((}} }} | {{{3}}} | [[{{{3}}}]] }}
* Parameters in the form l# may be used to change the displayed text of a article link.
+
}}{{
* The list is dynamically generated so that the word "and" is always placed between the final two entries.
+
  #if: {{{4|}}} | , {{
* If more than 10 entries are supplied, a message will be displayed pointing out the problem.
+
    #if: {{{5|}}} || and
; NB : no newlines are permitted else the article links will be broken.
+
  }} {{ #if: {{ #pos: {{{4}}} | {{!((}} }} | {{{4}}} | [[{{{4}}}]] }}
 
+
}}{{
==Example==
+
  #if: {{{5|}}} | , {{
{| class="box table bordered innerbordered colored type-basic cell-align-top"
+
    #if: {{{6|}}} || and
!| Code
+
  }} {{ #if: {{ #pos: {{{5}}} | {{!((}} }} | {{{5}}} | [[{{{5}}}]] }}
!| Result
+
}}{{
|-
+
  #if: {{{6|}}} | , {{
||{{Tlx|Main}}||{{Main}}
+
    #if: {{{7|}}} || and
|-
+
  }} {{ #if: {{ #pos: {{{6}}} | {{!((}} }} | {{{6}}} | [[{{{6}}}]] }}
||{{Tlx|Main|Article}}||{{Main|Article}}
+
}}{{
|-
+
  #if: {{{7|}}} | , {{
||{{Tlx|Main|Article|Article}}||{{Main|Article|Article}}
+
    #if: {{{8|}}} || and
|-
+
  }} {{ #if: {{ #pos: {{{7}}} | {{!((}} }} | {{{7}}} | [[{{{7}}}]] }}
||{{Tlx|Main|Article|Article|Article}}||{{Main|Article|Article|Article}}
+
}}{{
|-
+
  #if: {{{8|}}} | , {{
||{{Tlx|Main|Article|Article|4=l2=Alternate title}}||{{Main|Article|Article|l2=Alternate title}}
+
    #if: {{{9|}}} || and
|}
+
  }} {{ #if: {{ #pos: {{{8}}} | {{!((}} }} | {{{8}}} | [[{{{8}}}]] }}
''And so on up to 15 parameters.''
+
}}{{
 
+
  #if: {{{9|}}} | , {{
{{TagSync|include: *}}
+
    #if: {{{10|}}} || and
[[Category:Hatnote templates]]</noinclude>
+
  }} {{ #if: {{ #pos: {{{9}}} | {{!((}} }} | {{{9}}} | [[{{{9}}}]] }}
 +
}}{{
 +
  #if: {{{10|}}} | , {{
 +
    #if: {{{11|}}} || and
 +
  }} {{ #if: {{ #pos: {{{10}}} | {{!((}} }} | {{{10}}} | [[{{{10}}}]] }}
 +
}}{{
 +
  #if: {{{11|}}} | , {{
 +
    #if: {{{12|}}} || and
 +
  }} {{ #if: {{ #pos: {{{11}}} | {{!((}} }} | {{{11}}} | [[{{{11}}}]] }}
 +
}}{{
 +
  #if: {{{12|}}} | , {{
 +
    #if: {{{13|}}} || and
 +
  }} {{ #if: {{ #pos: {{{12}}} | {{!((}} }} | {{{12}}} | [[{{{12}}}]] }}
 +
}}{{
 +
  #if: {{{13|}}} | , {{
 +
    #if: {{{14|}}} || and
 +
  }} {{ #if: {{ #pos: {{{13}}} | {{!((}} }} | {{{13}}} | [[{{{13}}}]] }}
 +
}}{{
 +
  #if: {{{14|}}} | , {{
 +
    #if: {{{15|}}} || and
 +
  }} {{ #if: {{ #pos: {{{14}}} | {{!((}} }} | {{{14}}} | [[{{{14}}}]] }}
 +
}}{{
 +
  #if: {{{15|}}} | , and {{ #if: {{ #pos: {{{15}}} | {{!((}} }} | {{{15}}} | [[{{{15}}}]] }}
 +
}}{{
 +
  #if: {{{16|}}}
 +
  | — '''<br />Error: [[Template:See also|Too many links specified (maximum is 15)]]'''
 +
}}{{ #if: {{{l1|}}}{{{l2|}}}{{{l3|}}}{{{l4|}}}{{{l5|}}}{{{l6|}}}{{{l7|}}}{{{l8|}}}{{{l9|}}}{{{l10|}}}{{{l11|}}}{{{l12|}}}{{{l13|}}}{{{l14|}}}{{{l15|}}} | [[Category:Main transclusions needing to be updated]] }}</div><noinclude>
 +
{{Documentation}}</noinclude>

Revision as of 03:42, 31 March 2013