Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Mainarticle: Difference between revisions

Template page
More languages
Shane (talk | contribs)
mNo edit summary
Alvine (talk | contribs)
m Added french interwiki link.
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
:'''Main Article:''' ''[[{{{1}}}]]''
<includeonly>
:''Main article{{#if:{{{2|}}}|s}}&#58; [[{{{1}}}]]{{#if:{{{2| }}}
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[{{{2}}}]]}}{{#if:{{{3|}}}
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}[[{{{3}}}]]}}{{#if:{{{4|}}}
  |{{#if:{{{5|}}}|,&#32;|,&#32;and&#32;}}[[{{{4}}}]]}}{{#if:{{{5|}}}
  |, and [[{{{5}}}]]}}''{{#if:{{{6| }}}|&#32; (Error — Too many parameters in &#123;&#123;{{tl|mainarticle}}&#125;&#125;)}}</includeonly><noinclude>
= Documentation =
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 ==
<pre>
{{mainarticle
  |Article 1
}}
</pre>
 
You may also include additional links, up to five in total:
 
<pre>
{{mainarticle
  |Article 1
  |Article 2
  |Article 3
  |Article 4
  |Article 5
}}
</pre>
 
== Example ==
{| class="wikitable" width="100%"
! Code
! Result
|- style="vertical-align:top;"
| <pre>{{mainarticle|Article}}</pre>
| {{mainarticle|Article}}
|- style="vertical-align:top;"
| <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|{{PAGENAME}}]]
[[Category:Infoline|{{PAGENAME}}]]
[[fr:Modèle:Article principal]]
</noinclude>

Latest revision as of 21:44, 22 January 2009

Documentation

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

{{mainarticle
  |Article 1
}}

You may also include additional links, up to five in total:

{{mainarticle
  |Article 1
  |Article 2
  |Article 3
  |Article 4
  |Article 5
}}

Example

Code Result
{{mainarticle|Article}}
Main article: Article
{{mainarticle|Article1|Article2|Article3}}
Main articles: Article1, Article2, and Article3
{{mainarticle|Article1|Article2|Article3|Article4|Article5}}
Main articles: Article1, Article2, Article3, Article4, and Article5