Template:Main: Difference between revisions

From Simulacrum Wiki
Jump to navigation Jump to search
m (Includeonly the template to avoid errors on the template pages)
m (1 revision imported)
Line 1: Line 1:
<includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude>
<includeonly>:<div class="noprint">''Main article{{#if:{{{2|}}}|s}}&#58; [[{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2| }}}
{{documentation}}
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}[[{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
  |{{#if:{{{5|}}}|,&#32;|,&#32;and&#32;}}[[{{{4}}}|{{{l4|{{{4}}}}}}]]}}{{#if:{{{5|}}}
  |{{#if:{{{6|}}}|,&#32;|,&#32;and&#32;}}[[{{{5}}}|{{{l5|{{{5}}}}}}]]}}{{#if:{{{6|}}}
  |{{#if:{{{7|}}}|,&#32;|,&#32;and&#32;}}[[{{{6}}}|{{{l6|{{{6}}}}}}]]}}{{#if:{{{7|}}}
  |{{#if:{{{8|}}}|,&#32;|,&#32;and&#32;}}[[{{{7}}}|{{{l7|{{{7}}}}}}]]}}{{#if:{{{8|}}}
  |{{#if:{{{9|}}}|,&#32;|,&#32;and&#32;}}[[{{{8}}}|{{{l8|{{{8}}}}}}]]}}{{#if:{{{9|}}}
  |{{#if:{{{10|}}}|,&#32;|,&#32;and&#32;}}[[{{{9}}}|{{{l9|{{{9}}}}}}]]}}{{#if:{{{10|}}}
  |, and [[{{{10}}}|{{{l10|{{{10}}}}}}]]}}''{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}</div></includeonly><noinclude>
Use this template when an external article is directly relevant to a sub-section on a page.
 
<tt><nowiki>{{Main|List of Beast Wars Episodes}}</nowiki></tt>
{{Main|List of Beast Wars episodes}}
 
This template can list 10 articles this way.  To set the display text of those links, use the named arguments l1-l10.
 
<tt><pre><nowiki>{{Main
|Optimus Prime (G1)
|Jazz (G1)
|l2=Optimus Prime
|l2=Jazz
}}</nowiki></pre></tt>
 
{{Main|Optimus Prime (G1)|Jazz (G1)|l1=Optimus Prime|l2=Jazz}}
 
'''Note:''' Unlike many other templates <tt><nowiki>{{main}}</nowiki></tt> ''cannot'' be spread across multiple lines; it is shown that way in the above example for clarity.  No, I don't know why— it's a Wikipedia template.
 
 
 
[[Category:Templates|Main]]
</noinclude>
</noinclude>

Revision as of 11:13, 13 March 2023

Use this template when an external article is directly relevant to a sub-section on a page.

{{Main|List of Beast Wars Episodes}}

This template can list 10 articles this way. To set the display text of those links, use the named arguments l1-l10.

{{Main
 |Optimus Prime (G1)
 |Jazz (G1)
 |l2=Optimus Prime
 |l2=Jazz
}}
Main articles: Optimus Prime and Jazz

Note: Unlike many other templates {{main}} cannot be spread across multiple lines; it is shown that way in the above example for clarity. No, I don't know why— it's a Wikipedia template.