Permanently protected template

Difference between revisions of "Template:Main"

From Yugipedia
Jump to: navigation, search
m (Bot.)
 
m (Protected "Template:Main": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{TagSyncPage}}
+
{{Hatnote|Main {{{type|article}}}{{ #if: {{{2|}}} | {{{plural|s}}} }}: {{ #if: {{{1<includeonly>|</includeonly>}}}
</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|}}}
+
  | {{autolink|{{{1<noinclude>|{{SITENAME}}</noinclude>}}}}}
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}{{#if:{{{l2|}}}|[[{{{2}}}|{{{l2|{{{2}}}}}}]]|[[{{{2}}}]]}}}}{{#if:{{{3|}}}
+
  | '''Error: [[Template:Main|Template must be given at least one article name]]'''
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l3|}}}|[[{{{3}}}|{{{l3|{{{3}}}}}}]]|[[{{{3}}}]]}}}}{{#if:{{{4|}}}
+
}}{{ #if: {{{2|}}} | {{ #if: {{{3|}}} | , | &nbsp;and }} {{autolink|{{{2}}}}}
  |{{#if:{{{5|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l4|}}}|[[{{{4}}}|{{{l4|{{{4}}}}}}]]|[[{{{4}}}]]}}}}{{#if:{{{5|}}}
+
}}{{ #if: {{{3|}}} | , {{ #if: {{{4|}}} || and }} {{autolink|{{{3}}}}}
  |{{#if:{{{6|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l5|}}}|[[{{{5}}}|{{{l5|{{{5}}}}}}]]|[[{{{5}}}]]}}}}{{#if:{{{6|}}}
+
}}{{ #if: {{{4|}}} | , {{ #if: {{{5|}}} || and }} {{autolink|{{{4}}}}}
  |{{#if:{{{7|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l6|}}}|[[{{{6}}}|{{{l6|{{{6}}}}}}]]|[[{{{6}}}]]}}}}{{#if:{{{7|}}}
+
}}{{ #if: {{{5|}}} | , {{ #if: {{{6|}}} || and }} {{autolink|{{{5}}}}}
  |{{#if:{{{8|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l7|}}}|[[{{{7}}}|{{{l7|{{{7}}}}}}]]|[[{{{7}}}]]}}}}{{#if:{{{8|}}}
+
}}{{ #if: {{{6|}}} | , {{ #if: {{{7|}}} || and }} {{autolink|{{{6}}}}}
  |{{#if:{{{9|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l8|}}}|[[{{{8}}}|{{{l8|{{{8}}}}}}]]|[[{{{8}}}]]}}}}{{#if:{{{9|}}}
+
}}{{ #if: {{{7|}}} | , {{ #if: {{{8|}}} || and }} {{autolink|{{{7}}}}}
  |{{#if:{{{10|}}}|,&#32;|,&#32;and&#32;}}{{#if:{{{l9|}}}|[[{{{9}}}|{{{l9|{{{9}}}}}}]]|[[{{{9}}}]]}}}}{{#if:{{{10|}}}
+
}}{{ #if: {{{8|}}} | , {{ #if: {{{9|}}} || and }} {{autolink|{{{8}}}}}
  |, 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: {{{9|}}} | , {{ #if: {{{10|}}} || and }} {{autolink|{{{9}}}}}
 
+
}}{{ #if: {{{10|}}} | , {{ #if: {{{11|}}} || and }} {{autolink|{{{10}}}}}
==Usage==
+
}}{{ #if: {{{11|}}} | , {{ #if: {{{12|}}} || and }} {{autolink|{{{11}}}}}
{{Tlx|Main|Article 1|3=l1=Article 1 Displaytitle|4=...|5=''Article 10''}}
+
}}{{ #if: {{{12|}}} | , {{ #if: {{{13|}}} || and }} {{autolink|{{{12}}}}}
 
+
}}{{ #if: {{{13|}}} | , {{ #if: {{{14|}}} || and }} {{autolink|{{{13}}}}}
* Up to 10 parameters are permitted: only the first is mandatory.
+
}}{{ #if: {{{14|}}} | , {{ #if: {{{15|}}} || and }} {{autolink|{{{14}}}}}
* Parameters in the form l# may be used to change the displayed text of a article link.
+
}}{{ #if: {{{15|}}} | , and {{autolink|{{{15}}}}}
* The list is dynamically generated so that the word "and" is always placed between the final two entries.
+
}}{{ #if: {{{16|}}} | — '''<br />Error: [[Template:See also|Too many links specified (maximum is 15)]]'''
* If more than 10 entries are supplied, a message will be displayed pointing out the problem.
+
}}}}<noinclude>
; NB : no newlines are permitted else the article links will be broken.
+
{{Documentation}}</noinclude>
 
 
==Example==
 
{| class="box table bordered innerbordered colored type-basic cell-align-top"
 
!| Code
 
!| Result
 
|-
 
||{{Tlx|Main}}||{{Main}}
 
|-
 
||{{Tlx|Main|Article}}||{{Main|Article}}
 
|-
 
||{{Tlx|Main|Article|Article}}||{{Main|Article|Article}}
 
|-
 
||{{Tlx|Main|Article|Article|Article}}||{{Main|Article|Article|Article}}
 
|-
 
||{{Tlx|Main|Article|Article|4=l2=Alternate title}}||{{Main|Article|Article|l2=Alternate title}}
 
|}
 
''And so on up to 15 parameters.''
 
 
 
{{TagSync|include: *}}
 
[[Category:Templates/reader flow|{{PAGENAME}}]]</noinclude>
 

Revision as of 18:37, 3 June 2019