Template:Main: Difference between revisions

From AnthroWiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{{#if: {{{1|}}}|{{#ifexist:{{{1}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Haupt{{#if:{{NAMESPACE:{{{1}}}}}|page|article}}</span>: [[{{{1}}}{{#if: {{{titel1|}}}|{{!}}{{{titel1}}}}}]]{{#if: {{{2|}}}|{{#ifexist:{{{2}}}|{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|, [[{{{2}}}{{#if: {{{titel2|}}}|{{!}}{{{titel2}}}}}]]&nbsp;und [[{{{3}}}{{#if: {{{titel3|}}}|{{!}}{{{titel3}}}}}]]|&nbsp;und [[{{{2}}}{{#if: {{{titel2|}}}|{{!}}{{{titel2}}}}}]]}}|&nbsp;und [[{{{2}}}{{#if: {{{titel2|}}}|{{!}}{{{titel2}}}}}]]}}|{{#if: {{{3|}}}|{{#ifexist:{{{3|}}}|&nbsp;und [[{{{3}}}{{#if: {{{titel3|}}}|{{!}}{{{titel3}}}}}]]|}}|}}|}}|}}''</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: {{{titel2|}}}|{{!}}{{{titel2}}}}}]]{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|&nbsp;und [[{{{3}}}{{#if: {{{titel3|}}}|{{!}}{{{titel3}}}}}]]|}}|}}''</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: {{{titel3|}}}|{{!}}{{{titel3}}}}}]]''</div>|}}|}}|}}|}}|}}|<span class="error">'''Inclusion error: The [[Template:Main|Template Main]] always requires at least one argument.'''</span>}}</includeonly></onlyinclude>
<onlyinclude><includeonly>{{#if: {{{1|}}}|{{#ifexist:{{{1}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Main&nbsp;{{#if:{{NAMESPACE:{{{1}}}}}|page|article}}</span>: [[{{{1}}}{{#if: {{{title1|}}}|{{!}}{{{title1}}}}}]]{{#if: {{{2|}}}|{{#ifexist:{{{2}}}|{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|, [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]&nbsp;and [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]|&nbsp;and [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]}}|&nbsp;and [[{{{2}}}{{#if: {{{title2|}}}|{{!}}{{{title2}}}}}]]}}|{{#if: {{{3|}}}|{{#ifexist:{{{3|}}}|&nbsp;and [[{{{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}}}|&nbsp;and [[{{{3}}}{{#if: {{{title3|}}}|{{!}}{{{title3}}}}}]]|}}|}}''</div>|{{#if: {{{3|}}}|{{#ifexist:{{{3}}}|<div class="main"><span class="main-arrow">→ </span>''<span class="main-text">Main&nbsp;{{#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>

Latest revision as of 08:05, 11 March 2021

<templatestyles src="Module:Documentation/styles.css"></templatestyles>

Template documentation[view] [edit] [history] [purge]
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.