Template:Main/doc

From The World of Gotha
Revision as of 03:03, 25 October 2024 by Jph2 (talk | contribs) (Created page with "<noinclude>{{docsub}}</noinclude> The '''<nowiki>{{main}}</nowiki>''' template provides an easy means to include a {{wp|Wikipedia:Hatnote|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: || <code><nowiki>{{main|</nowiki>''article'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is a documentation subpage for Template:Main.
It may contain usage information, categories and other content that is not part of the original template page.

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 articles: Article1, Article2, and Article3
  • {{Main|Article1|Article2|l2=Label 2|Article3}}
Main articles: Article1, Label 2, and Article3

See also