Difference between revisions of "Template:Main"

From Detective Conan Wiki
m (Created page with '<div class="rellink{{#if:{{{extraclasses|}}}|<nowiki> </nowiki>{{{extraclasses}}}}}">{{{1}}}</div><noinclude> This meta-template is used to style section hatnotes which direct us...')
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="rellink{{#if:{{{extraclasses|}}}|<nowiki> </nowiki>{{{extraclasses}}}}}">{{{1}}}</div><noinclude>
+
{{rellink|extraclasses=noprint relarticle mainarticle|Main article{{#if:{{{2|}}}|s}}: {{{e1|[[{{{1}}}|{{{l1|{{{1}}}}}}]]}}}{{#if:{{{2|}}}
This meta-template is used to style section hatnotes which direct users to related articles.
+
|{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
 +
|{{#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;)}}}}<noinclude>
 +
== Usage ==
 +
To link to a "main article" on a topic, use &#123;{main|The other article}}.
 +
 
 +
You can also list several articles such as: &#123;{main|Article1|Article2|Article3}}. It will then display:
 +
:<div class="noprint">''Main articles: [[Article1]], [[Article2]] and [[Article3]]''</div>
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 18:55, 11 April 2018

Usage

To link to a "main article" on a topic, use {{main|The other article}}.

You can also list several articles such as: {{main|Article1|Article2|Article3}}. It will then display:

Main articles: Article1, Article2 and Article3