Template:Main: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#if: {{{1|}}}|{{#ifexist:{{{1}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text"> | <onlyinclude><includeonly>{{#if: {{{1|}}}|{{#ifexist:{{{1}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Main{{#if:{{NAMESPACE:{{{1}}}}}|page|article}}</span>: [[{{{1}}}{{#if: {{{title1|}}}|{{!}}{{{title1}}}}}]]{{#if: {{{2|}}}|{{#ifexist:{{{2}}}|{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|, [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]] und [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]| und [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]}}| und [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]}}|{{#if: {{{3|}}}|{{#ifexist:{{{3|}}}| und [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]|}}|}}|}}|}}''</div>|{{#if: {{{2|}}}|{{#ifexist:{{{2}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Haupt{{#if:{{NAMESPACE:{{{1}}}}}|page|article}}</span>: [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]{{#if: {{{3|}}}|{{#ifexist:{{{3}}}| und [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]|}}|}}''</div>|{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Main {{#if:{{NAMESPACE:{{{1}}}}}|page|article}}</span>: [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]''</div>|}}|}}|}}|}}|}}|<span class="error">'''Inclusion error: The [[Template:Main|Template Main]] always requires at least one argument.'''</span>}}</includeonly></onlyinclude> | ||
<noinclude>{{Documentation}}</noinclude> | <noinclude>{{Documentation}}</noinclude> |
Revision as of 18:31, 25 February 2021
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
This template is integrated many times. If you know exactly what the effects are, you can edit it. In most cases, however, it makes sense to first vote on change requests on Template Discussion. |
This template is used after the heading of the summary, to link to the subtopic article that has been summarized.
Usage
The template is used as follows:
{{Main|Article}}
.
This is formatted as follows:
→ Main article: Article
Alternatively, it can be used for two or three articles:
{{Main|Article 1|Article 2}}
.
{{Main|Article 1|Article 2|Article 3|title1=Titel 1|titel2=Titel 2|title3=Titele 3}}
Blank lines before or after template inclusion are optional, but the template should always be on its own line.
The arguments "title1", "title2" and "title3" can be used to specify alternative texts, but this should only be done for "artificial" Lemmas (e. e.g. bracket lemmas), not to hide the real name of the main article.
{{main|Folsom (New Mexico)|title1=Folsom}}
Gives:
→ Main article: Folsom
The link will not appear if the corresponding target article does not exist.