Difference between revisions of "Template: Main"

From A Wiki of Ice and Fire
Jump to: navigation, search
(See also: background, details)
 
(15 intermediate revisions by 7 users not shown)
Line 1: Line 1:
:''Main article{{if
+
<includeonly>{{#invoke:main|main}}</includeonly><noinclude>
|{{{2|}}}|s}}: {{if
+
{{documentation}}
  |{{{1|}}}|[[{{{1}}}]]{{if
 
  |{{{2|}}}|, [[{{{2}}}]]{{if
 
    |{{{3|}}}|, [[{{{3}}}]]{{if
 
    |{{{4|}}}|, [[{{{4}}}]]{{if
 
      |{{{5|}}}|, [[{{{5}}}]]{{if
 
      |{{{6|}}}|, [[{{{6}}}]]{{if
 
        |{{{7|}}}|, [[{{{7}}}]]{{if
 
        |{{{8|}}}|, [[{{{8}}}]]{{if
 
          |{{{9|}}}|, [[{{{9}}}]]{{if
 
          |{{{10|}}}|, [[{{{10}}}]]{{if
 
            |{{{11|}}}|, [[{{{11}}}]]{{if
 
            |{{{12|}}}|, [[{{{12}}}]]{{if
 
              |{{{13|}}}|, [[{{{13}}}]]{{if
 
              |{{{14|}}}|, [[{{{14}}}]]{{if
 
                |{{{15|}}}|, [[{{{15}}}]]{{if
 
                |{{{16|}}}|, [[{{{16}}}]]{{if
 
                  |{{{17|}}}|, [[{{{17}}}]]{{if
 
                  |{{{18|}}}|, [[{{{18}}}]]{{if
 
                    |{{{19|}}}|, [[{{{19}}}]]{{if
 
                    |{{{20|}}}|, [[{{{20}}}]]}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}''<noinclude>
 
----
 
{{esoteric}}
 
:''Please be mindful of the talk page discussions that have determined '''Template:Main''''s appearance.''
 
__NOTOC__
 
==Purpose of template==
 
When [[Wikipedia:What is an article|Wikipedia article]]s
 
become too large, subarticles are usually created.  This [[Wikipedia:Template messages|template]], used in the subarticle, uses the name of the main article as a [[m:Help:Template#Parameters|parameter]] to produce a link to the main article:
 
 
 
<nowiki>
 
{{main|Article}}
 
</nowiki>
 
 
 
will produce
 
{{main|Article}}
 
 
 
To reference multiple articles, the {{tl|main articles}} template can be used instead, as so:
 
 
 
<nowiki>
 
{{main articles}} [[a]], [[b]], [[c]]
 
</nowiki>
 
 
 
which produces:
 
{{main articles}} [[a]], [[b]], [[c]]
 
 
 
== Comparison with related templates ==
 
 
 
The following two are meant to be used in connection with each other:
 
 
 
* At the top of a brief section concerning a subject that has a more detailed article (this is the only form specified by the [[Wikipedia:Summary style|Wikipedia Manual of Style]]);
 
* ''or'' at the top of the specialized article, to refer to the more general article: {{tiwt|main}}
 
* at the top or bottom of a section of the more general article, to refer to the specialized article: {{tiwt|see details}}
 
----
 
The following set of two is an alternative:
 
*{{tiwt|subarticleof}}
 
*{{tiwt|seesubarticle}}
 
 
 
==References==
 
* [[Wikipedia:Long article layout]]
 
* [[Wikipedia:Summary style]]
 
* [[m:Help:Template]]
 
 
 
==See also==
 
* {{tl|Main}}, {{tl|Main2}}
 
* {{tl|Background}}
 
* {{tl|Details}}
 
* {{tl|See}}, {{tl|See2}}, {{tl|See3}}, {{tl|See4}}, {{tl|See5}}
 
* {{tl|See also}}, {{tl|Seealso2}}, {{tl|Seealso3}}, {{tl|Seealso4}}, {{tl|Seealso5}}, {{tl|Seealso6}}, {{tl|Seealso7}}, {{tl|Seealso8}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 16:30, 10 September 2018

Template documentation[view] [edit] [history] [purge]

Usage

When a article is becoming too large, it is often re-written as summary, with summary sub sections linking to its main articles. This hatnote template is placed below the heading of the summary sub sections to link to its main article. For an example of the result of the usage of this template on a page, see e.g. Robert's Rebellion.

This template is not to be used as a substitute for normal inline links, or as a substitute for the "see also"-template.

Examples

For linking to a main article (Eddard Stark in the example), typing {{Main|Eddard Stark}} will result in:


For linking to multiple main articles, typing {{Main|Eddard Stark|Catelyn Stark}} will give the following result:


It is also possible to link to a page in a different namespace (e.g. the template namespace or help namespace). For example, to link to the Help:Links page, typing {{Main|Help:Links}} will result in:

It is possible to create the same link with an alternative title. Typing {{Main|Help:Links|l1=Links}} will create a link to the page Help:Links with an alternative title, e.g. this: