Difference between revisions of "Template:Main"
Dinoguy1000 (talk | contribs) (update based on my changes to {{See also}}; {{Documentation}}) |
|||
Line 1: | Line 1: | ||
− | < | + | <div class="rellink">Main article{{ #if: {{{2|}}} | s }}: {{ |
− | + | #if: {{{1<includeonly>|</includeonly>}}} | |
− | + | | {{ | |
− | + | #if: {{ #pos: {{{1<noinclude>|[[foo]]</noinclude>}}} | {{!((}} }} | |
− | + | | {{{1<noinclude>|[[Main Page]]</noinclude>}}} | |
− | + | | [[{{{1}}}]] | |
− | + | }} | |
− | + | | '''Error: [[Template:Main|Template must be given at least one article name]]''' | |
− | + | }}{{ | |
− | + | #if: {{{2|}}} | {{ | |
− | + | #if: {{{3|}}} | , | and | |
− | + | }} {{ #if: {{ #pos: {{{2}}} | {{!((}} }} | {{{2}}} | [[{{{2}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{3|}}} | , {{ | |
− | + | #if: {{{4|}}} || and | |
− | + | }} {{ #if: {{ #pos: {{{3}}} | {{!((}} }} | {{{3}}} | [[{{{3}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{4|}}} | , {{ | |
− | + | #if: {{{5|}}} || and | |
− | + | }} {{ #if: {{ #pos: {{{4}}} | {{!((}} }} | {{{4}}} | [[{{{4}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{5|}}} | , {{ | |
− | {| | + | #if: {{{6|}}} || and |
− | + | }} {{ #if: {{ #pos: {{{5}}} | {{!((}} }} | {{{5}}} | [[{{{5}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{6|}}} | , {{ | |
− | + | #if: {{{7|}}} || and | |
− | + | }} {{ #if: {{ #pos: {{{6}}} | {{!((}} }} | {{{6}}} | [[{{{6}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{7|}}} | , {{ | |
− | + | #if: {{{8|}}} || and | |
− | + | }} {{ #if: {{ #pos: {{{7}}} | {{!((}} }} | {{{7}}} | [[{{{7}}}]] }} | |
− | + | }}{{ | |
− | | | + | #if: {{{8|}}} | , {{ |
− | + | #if: {{{9|}}} || and | |
− | + | }} {{ #if: {{ #pos: {{{8}}} | {{!((}} }} | {{{8}}} | [[{{{8}}}]] }} | |
− | + | }}{{ | |
− | + | #if: {{{9|}}} | , {{ | |
− | {{ | + | #if: {{{10|}}} || and |
− | + | }} {{ #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
Main article: Main Page
{{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]]}}
|