Template:Main: Difference between revisions

From TenthFleet
Jump to navigation Jump to search
m Revamp as an indented Wikipedia-style section hatnote (multi-article grammar, backward compatible)
m nowiki the {{Main}} in the doc Notes (was rendering a stray empty hatnote)
 
Line 14: Line 14:


==Notes==
==Notes==
Styling lives in the <code>.tf-hatnote</code> class in [[MediaWiki:Common.css]] (italic, left-indented). This is a lightweight version of Wikipedia's [https://en.wikipedia.org/wiki/Template:Main {{Main}}] hatnote; it supports up to four articles and section anchors, but not custom link labels.
Styling lives in the <code>.tf-hatnote</code> class in [[MediaWiki:Common.css]] (italic, left-indented). This is a lightweight version of Wikipedia's [https://en.wikipedia.org/wiki/Template:Main <nowiki>{{Main}}</nowiki>] hatnote; it supports up to four articles and section anchors, but not custom link labels.


[[Category:Formatting]]
[[Category:Formatting]]

Latest revision as of 16:03, 14 July 2026

Purpose & Use

Place {{Main}} at the very top of a section, directly under its heading, to point readers to the main article(s) on that topic — in the style of Wikipedia's hatnote. It renders an indented, italic Main article: line.

Syntax

  • {{Main|Article}}
  • {{Main|Article#Section}} — links to a specific section
  • {{Main|Article 1|Article 2|Article 3|Article 4}} — up to four (renders Main articles: A, B, C and D)

Examples

Notes

Styling lives in the .tf-hatnote class in MediaWiki:Common.css (italic, left-indented). This is a lightweight version of Wikipedia's {{Main}} hatnote; it supports up to four articles and section anchors, but not custom link labels.