Difference between revisions of "Template:Main"
Dinoguy1000 (talk | contribs) ({{Hatnote}} instead of a hardcoded <div>; tweak spacing) |
Dinoguy1000 (talk | contribs) (categorize error cases) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Hatnote|Main {{{type|article}}}{{ #if: {{{2|}}} | {{{plural|s}}} }}: {{ #if: {{{1<includeonly>|</includeonly>}}} | {{Hatnote|Main {{{type|article}}}{{ #if: {{{2|}}} | {{{plural|s}}} }}: {{ #if: {{{1<includeonly>|</includeonly>}}} | ||
− | | {{autolink|{{{1<noinclude>|{{SITENAME}}</noinclude>}}}}} | + | | {{autolink|{{{1<noinclude>|{{SITENAME}}</noinclude>}}}|t={{{t|}}}}} |
− | | '''Error: [[Template:Main|Template must be given at least one article name]]''' | + | | '''Error: [[Template:Main|Template must be given at least one article name]]'''[[Category:Empty ((Main)) transclusions]] |
− | }}{{ #if: {{{2|}}} | {{ #if: {{{3|}}} | , | and }} {{autolink|{{{2}}}}} | + | }}{{ #if: {{{2|}}} | {{ #if: {{{3|}}} | , | and }} {{autolink|{{{2}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{3|}}} | , {{ #if: {{{4|}}} || and }} {{autolink|{{{3}}}}} | + | }}{{ #if: {{{3|}}} | , {{ #if: {{{4|}}} || and }} {{autolink|{{{3}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{4|}}} | , {{ #if: {{{5|}}} || and }} {{autolink|{{{4}}}}} | + | }}{{ #if: {{{4|}}} | , {{ #if: {{{5|}}} || and }} {{autolink|{{{4}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{5|}}} | , {{ #if: {{{6|}}} || and }} {{autolink|{{{5}}}}} | + | }}{{ #if: {{{5|}}} | , {{ #if: {{{6|}}} || and }} {{autolink|{{{5}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{6|}}} | , {{ #if: {{{7|}}} || and }} {{autolink|{{{6}}}}} | + | }}{{ #if: {{{6|}}} | , {{ #if: {{{7|}}} || and }} {{autolink|{{{6}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{7|}}} | , {{ #if: {{{8|}}} || and }} {{autolink|{{{7}}}}} | + | }}{{ #if: {{{7|}}} | , {{ #if: {{{8|}}} || and }} {{autolink|{{{7}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{8|}}} | , {{ #if: {{{9|}}} || and }} {{autolink|{{{8}}}}} | + | }}{{ #if: {{{8|}}} | , {{ #if: {{{9|}}} || and }} {{autolink|{{{8}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{9|}}} | , {{ #if: {{{10|}}} || and }} {{autolink|{{{9}}}}} | + | }}{{ #if: {{{9|}}} | , {{ #if: {{{10|}}} || and }} {{autolink|{{{9}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{10|}}} | , {{ #if: {{{11|}}} || and }} {{autolink|{{{10}}}}} | + | }}{{ #if: {{{10|}}} | , {{ #if: {{{11|}}} || and }} {{autolink|{{{10}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{11|}}} | , {{ #if: {{{12|}}} || and }} {{autolink|{{{11}}}}} | + | }}{{ #if: {{{11|}}} | , {{ #if: {{{12|}}} || and }} {{autolink|{{{11}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{12|}}} | , {{ #if: {{{13|}}} || and }} {{autolink|{{{12}}}}} | + | }}{{ #if: {{{12|}}} | , {{ #if: {{{13|}}} || and }} {{autolink|{{{12}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{13|}}} | , {{ #if: {{{14|}}} || and }} {{autolink|{{{13}}}}} | + | }}{{ #if: {{{13|}}} | , {{ #if: {{{14|}}} || and }} {{autolink|{{{13}}}|t={{{t|}}}}} |
− | }}{{ #if: {{{14|}}} | , {{ #if: {{{15|}}} || and }} {{autolink|{{{14}}}}} | + | }}{{ #if: {{{14|}}} | , {{ #if: {{{15|}}} || and }} {{autolink|{{{14}}}|t={{{t|}}}}} |
}}{{ #if: {{{15|}}} | , and {{autolink|{{{15}}}}} | }}{{ #if: {{{15|}}} | , and {{autolink|{{{15}}}}} | ||
− | }}{{ #if: {{{16|}}} | — '''<br />Error: [[Template: | + | }}{{ #if: {{{16|}}} | — '''<br />Error: [[Template:Main|Too many links specified (maximum is 15)]]'''[[Category:((Main)) transclusions with too many parameters]] |
}}}}<noinclude> | }}}}<noinclude> | ||
{{Documentation}}</noinclude> | {{Documentation}}</noinclude> |
Latest revision as of 16:23, 4 May 2023
{{Main}}
is used below section titles to explain where the main article on the subject is.
Usage
{{Main|Article 1|...|''Article 15''}}
- Up to 15 parameters are permitted: only the first is mandatory.
- The list is dynamically generated so that the word "and" is always placed between the final two entries.
- If more than 15 entries are supplied, a message will be displayed pointing out the problem.
- NB
- no newlines are permitted else the article links will be broken.
Example
Code | Result |
---|---|
{{Main}}
|
|
{{Main|Article}}
|
|
{{Main|Article|Article}}
|
|
{{Main|Article|Article|Article}}
|
|
{{Main|Article|[[Article|Alternate title]]}}
|
|
{{Main|Article|Article|[[Article|Alternate title]]}}
|