Template:Main: Difference between revisions
Jump to navigation
Jump to search
m (Consistent style.) |
(New documentation style.) |
||
Line 4: | Line 4: | ||
|{{#if:{{{5|}}}|, |, and }}'''[[{{{4}}}|{{{l4|{{{4}}}}}}]]'''}}{{#if:{{{5|}}} | |{{#if:{{{5|}}}|, |, and }}'''[[{{{4}}}|{{{l4|{{{4}}}}}}]]'''}}{{#if:{{{5|}}} | ||
|, and '''[[{{{5}}}|{{{l5|{{{5}}}}}}]]'''}}.{{#if:{{{6| }}}|  (too many parameters in {{tem|Main}})}}}}<noinclude> | |, and '''[[{{{5}}}|{{{l5|{{{5}}}}}}]]'''}}.{{#if:{{{6| }}}|  (too many parameters in {{tem|Main}})}}}}<noinclude> | ||
== | ==Info== | ||
This template adds a link to the main article for the subheading it is placed in. | This template adds a link to the main article for the subheading it is placed in. | ||
< | ==Parameters== | ||
{| class = "wikitable" | |||
! Parameter || Mandatory || Default || Purpose || Detailed description | |||
|- | |||
! 1 | |||
| '''Yes''' || || Link 1 || Link to the main article. | |||
|- | |||
! l1 | |||
| No || || Text 1 || Text to display on the link to the main article. | |||
|- | |||
! 2 - 5 | |||
| No || || Alternative links || Alternative links to other main articles. | |||
|- | |||
! l2 - l5 | |||
| No || || Alternative text || Text to display on the alternative links. | |||
|} | |||
==Template== | |||
<pre> | |||
{{main|<link>|l1=<text>|<other links>|l*=<other links' text>}} | |||
</pre> | |||
==Examples== | |||
{| class = "wikitable" | |||
! Code || Result | |||
|- | |||
| <pre>{{main|Main Page}}</pre> | |||
| {{main|Main Page}} | |||
|- | |||
| <pre>{{main|Main Page|l1=The front page}}</pre> | |||
| {{main|Main Page|l1=The front page}} | |||
|- | |||
| <pre>{{main | |||
|Main Page|Talk:Main Page|Pikipedia:About | |||
|l2=Main Page talk|l3=About Pikipedia}}</pre> | |||
| {{main|Main Page|Talk:Main Page|Pikipedia:About|l2=Main Page talk|l3=About Pikipedia}} | |||
|} | |||
[[Category:Templates]] | |||
</noinclude> | </noinclude> |
Revision as of 09:53, October 28, 2014
- Main article: [[{{{1}}}|{{{1}}}]].
Info
This template adds a link to the main article for the subheading it is placed in.
Parameters
Parameter | Mandatory | Default | Purpose | Detailed description |
---|---|---|---|---|
1 | Yes | Link 1 | Link to the main article. | |
l1 | No | Text 1 | Text to display on the link to the main article. | |
2 - 5 | No | Alternative links | Alternative links to other main articles. | |
l2 - l5 | No | Alternative text | Text to display on the alternative links. |
Template
{{main|<link>|l1=<text>|<other links>|l*=<other links' text>}}
Examples
Code | Result |
---|---|
{{main|Main Page}} |
|
{{main|Main Page|l1=The front page}} |
|
{{main |Main Page|Talk:Main Page|Pikipedia:About |l2=Main Page talk|l3=About Pikipedia}} |
|