Template:Main: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Manual revert |
m (Move documentation to a subpage) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{{5|}}} | :'' | <includeonly>{{#ifeq: {{NAMESPACE}} | Category | ||
| {{#if: {{{4|}}} | :'' | | {{#if: {{{5|}}} | :''The main articles for this category are '''[[{{{1}}}|{{{l1|{{{1}}}}}}]]''', '''[[{{{2}}}|{{{l2|{{{2}}}}}}]]''', '''[[{{{3}}}|{{{l3|{{{3}}}}}}]]''', '''[[{{{4}}}|{{{l4|{{{4}}}}}}]]''', and '''[[{{{5}}}|{{{l5|{{{5}}}}}}]]'''.'' | ||
| {{#if: {{{3|}}} | :'' | | {{#if: {{{4|}}} | :''The main articles for this category are '''[[{{{1}}}|{{{l1|{{{1}}}}}}]]''', '''[[{{{2}}}|{{{l2|{{{2}}}}}}]]''', '''[[{{{3}}}|{{{l3|{{{3}}}}}}]]''', and '''[[{{{4}}}|{{{l4|{{{4}}}}}}]]'''.'' | ||
| {{#if: {{{2|}}} | :'' | | {{#if: {{{3|}}} | :''The main articles for this category are '''[[{{{1}}}|{{{l1|{{{1}}}}}}]]''', '''[[{{{2}}}|{{{l2|{{{2}}}}}}]]''', and '''[[{{{3}}}|{{{l3|{{{3}}}}}}]]'''.'' | ||
| :'' | | {{#if: {{{2|}}} | :''The main articles for this category are '''[[{{{1}}}|{{{l1|{{{1}}}}}}]]''' and '''[[{{{2}}}|{{{l2|{{{2}}}}}}]]'''.'' | ||
| :''The main article for this category is '''[[{{{1}}}|{{{l1|{{{1}}}}}}]]'''.'' | |||
}} }} }} }} | }} }} }} }} | ||
| {{#if: {{{5|}}} | :''Main articles: [[{{{1}}}|{{{l1|{{{1}}}}}}]], [[{{{2}}}|{{{l2|{{{2}}}}}}]], [[{{{3}}}|{{{l3|{{{3}}}}}}]], [[{{{4}}}|{{{l4|{{{4}}}}}}]], and [[{{{5}}}|{{{l5|{{{5}}}}}}]]'' | |||
| {{#if: {{{4|}}} | :''Main articles: [[{{{1}}}|{{{l1|{{{1}}}}}}]], [[{{{2}}}|{{{l2|{{{2}}}}}}]], [[{{{3}}}|{{{l3|{{{3}}}}}}]], and [[{{{4}}}|{{{l4|{{{4}}}}}}]]'' | |||
| {{#if: {{{3|}}} | :''Main articles: [[{{{1}}}|{{{l1|{{{1}}}}}}]], [[{{{2}}}|{{{l2|{{{2}}}}}}]], and [[{{{3}}}|{{{l3|{{{3}}}}}}]]'' | |||
| {{#if: {{{2|}}} | :''Main articles: [[{{{1}}}|{{{l1|{{{1}}}}}}]] and [[{{{2}}}|{{{l2|{{{2}}}}}}]]'' | |||
| :''Main article: [[{{{1}}}|{{{l1|{{{1}}}}}}]]''}} }} }} }} | |||
}}</includeonly><noinclude>{{doc}} | |||
[[Category:Hatnote templates]] | |||
</noinclude> |
Latest revision as of 03:04, 25 October 2024
Template documentation
The {{main}} template provides an easy means to include a hatnote that links to an article section's main article(s). The template auto-detects if it is used on a category page. Up to five articles may be linked to. Different text from the article name may be specified; the display text defaults to the article name.
Usage
Basic usage: | {{main|article}}
|
All parameters: | {{main|article1|article2|article3|article4|article5|l1 = label1|l2 = label2|l3 = label3|l4 = label4|l5 = label5}}
|
Parameters
Unneeded parameters may be omitted.
1
,2
,3
,4
,5
— the page(s) to link to.l1
,l2
,l3
,l4
,l5
— optional label(s) to display instead of the page name(s).
Examples
{{Main|Article}}
- Main article: Article
{{Main|Article1|Article2|Article3}}
{{Main|Article1|Article2|l2=Label 2|Article3}}
See also
- {{See also}}