Template:Main: Difference between revisions

From Halopedia, the Halo wiki

(Updated using Wikipedia's current version.)
m (Integrating WikiMain)
Line 1: Line 1:
:''Main article{{#if:{{{2|}}}|s}}: [[{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2| }}}
:''Main article{{#if:{{{2|}}}|s}}: [[w:c:{{{wiki|halo}}}:{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2| }}}
  |{{#if:{{{3|}}}|, | and }}[[{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
  |{{#if:{{{3|}}}|, | and }}[[w:c:{{{wiki|halo}}}:{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
  |{{#if:{{{4|}}}|, |, and }}[[{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
  |{{#if:{{{4|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
  |{{#if:{{{5|}}}|, |, and }}[[{{{4}}}|{{{l4|{{{4}}}}}}]]}}{{#if:{{{5|}}}
  |{{#if:{{{5|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{4}}}|{{{l4|{{{4}}}}}}]]}}{{#if:{{{5|}}}
  |{{#if:{{{6|}}}|, |, and }}[[{{{5}}}|{{{l5|{{{5}}}}}}]]}}{{#if:{{{6|}}}
  |{{#if:{{{6|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{5}}}|{{{l5|{{{5}}}}}}]]}}{{#if:{{{6|}}}
  |{{#if:{{{7|}}}|, |, and }}[[{{{6}}}|{{{l6|{{{6}}}}}}]]}}{{#if:{{{7|}}}
  |{{#if:{{{7|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{6}}}|{{{l6|{{{6}}}}}}]]}}{{#if:{{{7|}}}
  |{{#if:{{{8|}}}|, |, and }}[[{{{7}}}|{{{l7|{{{7}}}}}}]]}}{{#if:{{{8|}}}
  |{{#if:{{{8|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{7}}}|{{{l7|{{{7}}}}}}]]}}{{#if:{{{8|}}}
  |{{#if:{{{9|}}}|, |, and }}[[{{{8}}}|{{{l8|{{{8}}}}}}]]}}{{#if:{{{9|}}}
  |{{#if:{{{9|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{8}}}|{{{l8|{{{8}}}}}}]]}}{{#if:{{{9|}}}
  |{{#if:{{{10|}}}|, |, and }}[[{{{9}}}|{{{l9|{{{9}}}}}}]]}}{{#if:{{{10|}}}
  |{{#if:{{{10|}}}|, |, and }}[[w:c:{{{wiki|halo}}}:{{{9}}}|{{{l9|{{{9}}}}}}]]}}{{#if:{{{10|}}}
  |, and [[{{{10}}}|{{{l10|{{{10}}}}}}]]}}''{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}<noinclude>
  |, and [[{{{10}}}|{{{l10|{{{10}}}}}}]]}}''{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}<noinclude>


Line 13: Line 13:
To link to a "main article" on a topic, use &#123;{main|The other article}}.
To link to a "main article" on a topic, use &#123;{main|The other article}}.


== Advanced Usage (Multiple main articles) ==
=== Advanced Usage (Multiple main articles) ===
For multiple main articles, use <code><nowiki>{{main|Main Article 1|Main Article 2}}</nowiki></code>. Up to ten main articles may be listed.
For multiple main articles, use <code><nowiki>{{main|Main Article 1|Main Article 2}}</nowiki></code>. Up to ten main articles may be listed.


== Advanced Usage (Changing a Link's Name) ==
=== Advanced Usage (Changing a Link's Name) ===
You may want the main article's name to show up differently; named parameters are good for the job.
You may want the main article's name to show up differently; named parameters are good for the job.
<pre><nowiki>{{main
<pre><nowiki>{{main
Line 25: Line 25:
}}</nowiki></pre>
}}</nowiki></pre>
Note that the named parameters are a lowercase "L" and a number, ''not'' the number 1 and then another number.
Note that the named parameters are a lowercase "L" and a number, ''not'' the number 1 and then another number.
=== Advanced Usage (Interwiki Link) ===
This template is also capable of redirecting to any wiki. '''Note''': Make sure the links you added are correct. <code>Wiki</code> refers to the domain of the wiki. For instance, Halopedia's domain is halo, Red vs Blue domain is rvb, World of Warcraft's domain is wow.
<pre>
{{Main
|wiki=
|1=
}}
</pre>
===Example===
This template also has an additional feature. Below is an example
*<code>1=</code> refers to the actual link.
*<code>l1=</code> refers to an optional yet customisable title for the link.
<pre>
{{Main
|wiki=rvb
|1=Michael J. Caboose
|l1=Caboose Blue Team
}}
__NOTOC__
[[Category:Templates|{{PAGENAME}}]]
</noinclude>

Revision as of 14:48, September 16, 2009

Main article: [[w:c:halo:{{{1}}}|{{{1}}}]]

Usage

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

Advanced Usage (Multiple main articles)

For multiple main articles, use {{main|Main Article 1|Main Article 2}}. Up to ten main articles may be listed.

Advanced Usage (Changing a Link's Name)

You may want the main article's name to show up differently; named parameters are good for the job.

{{main
|1=Main Article 1
|l1=Link Title 1
|2=Main Article 2
|l2=Link Title 2
}}

Note that the named parameters are a lowercase "L" and a number, not the number 1 and then another number.

Advanced Usage (Interwiki Link)

This template is also capable of redirecting to any wiki. Note: Make sure the links you added are correct. Wiki refers to the domain of the wiki. For instance, Halopedia's domain is halo, Red vs Blue domain is rvb, World of Warcraft's domain is wow.

{{Main
|wiki=
|1=
}}

Example

This template also has an additional feature. Below is an example

  • 1= refers to the actual link.
  • l1= refers to an optional yet customisable title for the link.
:Main article: Caboose Blue Team