Difference between revisions of "Template:Main"

(cats)
m (updating)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
:<div class="noprint">''Main article{{#if:{{{2|}}}|s}}&#58; [[{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2| }}}
+
<includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude>
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
+
{{documentation}}
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}[[{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
+
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
  |{{#if:{{{5|}}}|,&#32;|,&#32;and&#32;}}[[{{{4}}}|{{{l4|{{{4}}}}}}]]}}{{#if:{{{5|}}}
 
  |, and [[{{{5}}}|{{{l5|{{{5}}}}}}]]}}''{{#if:{{{6| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}</div><noinclude>
 
----
 
== Usage ==
 
To link to a "main article" on a topic, use '''<nowiki>{{main|The other article}}</nowiki>''', replacing 'the other article' with the actual name of the main page.
 
 
 
==Example==
 
<pre>
 
<nowiki>{{main|Knights of the Inner Sphere}}</nowiki>
 
</pre>
 
Will display:
 
:''Main article: [[Knights of the Inner Sphere]]''
 
 
 
 
 
(The example can be seen [[Free Worlds League Military#Knights of the Inner Sphere|here]])
 
 
 
[[Category:Page Information templates|{{PAGENAME}}]]
 
[[Category:Templates|{{PAGENAME}}]]
 
[[Category:List templates|Main]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 22:17, 10 March 2024