Difference between revisions of "Template: Main"

From A Wiki of Ice and Fire
Jump to: navigation, search
m (Doc)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
''Main article{{if
+
<includeonly>{{#invoke:main|main}}</includeonly><noinclude>
|{{{2|}}}|s}}: {{if
+
{{documentation}}
  |{{{1|}}}|[[{{{1}}}]]{{if
+
</noinclude>
  |{{{2|}}}|, [[{{{2}}}]]{{if
 
    |{{{3|}}}|, [[{{{3}}}]]{{if
 
    |{{{4|}}}|, [[{{{4}}}]]{{if
 
      |{{{5|}}}|, [[{{{5}}}]]}}}}}}}}}}''<noinclude>
 
 
 
===Usage===
 
When a article is large, it is often devided into sub-articles.  This template is used below the heading of the summary, to link to the sub-article that has been (or will be) summarised.
 
 
 
===Examples=== {| class="wikitable"
 
|-
 
! Code
 
! Result
 
|-
 
| <pre>{{Main|Eddard Stark}}</pre>  
 
| {{Main|Eddard Stark}}
 
|-
 
| <pre>{{Main|Eddard Stark|Catelyn Stark}}</pre>  
 
| {{Main|Eddard Stark|Catelyn Stark}}
 
|}
 
 
 
 
 
[[Category:Templates]] </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: