Editing Template:Mainarticle
Template page
More actions
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
<includeonly>: | <includeonly> | ||
:''Main article{{#if:{{{2|}}}|s}}: [[{{{1}}}]]{{#if:{{{2| }}} | |||
|{{#if:{{{3|}}}|, | and }}[[{{{2}}}]]}}{{#if:{{{3|}}} | |||
|{{#if:{{{4|}}}|, |, and }}[[{{{3}}}]]}}{{#if:{{{4|}}} | |||
|{{#if:{{{5|}}}|, |, and }}[[{{{4}}}]]}}{{#if:{{{5|}}} | |||
|, and [[{{{5}}}]]}}''{{#if:{{{6| }}}|  (Error — Too many parameters in {{{{tl|mainarticle}}}})}}</includeonly><noinclude> | |||
= Documentation = | = Documentation = | ||
When articles become too large, subarticles are usually created. This template | When articles become too large, subarticles are usually created. This template, used in the subarticle, uses the name of the main article as a parameter to produce a link to the main article. | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{mainarticle|Article 1}} | {{mainarticle | ||
|Article 1 | |||
}} | |||
</pre> | </pre> | ||
You may also include additional links, up to five in total: | |||
You | |||
<pre> | <pre> | ||
{{mainarticle|Article 1|Article 2|Article 3|Article 4|Article 5}} | {{mainarticle | ||
|Article 1 | |||
|Article 2 | |||
|Article 3 | |||
|Article 4 | |||
|Article 5 | |||
}} | |||
</pre> | </pre> | ||
== Example == | == Example == | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
! Code | ! Code | ||
|- | ! Result | ||
| <pre>{{mainarticle|Article}}</pre> || | |- style="vertical-align:top;" | ||
|- | | <pre>{{mainarticle|Article}}</pre> | ||
| <pre>{{mainarticle| | | {{mainarticle|Article}} | ||
|- | |- style="vertical-align:top;" | ||
| <pre>{{mainarticle|Article1|Article2|Article3}}</pre> || | | <pre>{{mainarticle|Article1|Article2|Article3}}</pre> | ||
| {{mainarticle|Article1|Article2|Article3}} | |||
|- style="vertical-align:top;" | |||
| <pre>{{mainarticle|Article1|Article2|Article3|Article4|Article5}}</pre> | |||
| {{mainarticle|Article1|Article2|Article3|Article4|Article5}} | |||
|} | |} | ||
[[Category:Templates using ParserFunctions]] | [[Category:Templates using ParserFunctions|{{PAGENAME}}]] | ||
[[Category:Infoline]] | [[Category:Infoline|{{PAGENAME}}]] | ||
[[fr:Modèle:Article principal]] | |||
</noinclude> | </noinclude> | ||