Template:Main

From Wikibooks, open books for an open world
Jump to: navigation, search
Main page: [[:{{{1}}}|{{{1}}}]]
Template documentation[edit] [history] [purge]

When a topic is large, it is often rewritten in summary style. This template is used to link to the page the has been summarized.

This template is not to be used as a substitute for inline links or as a "main". Its usage should be restricted to the purpose described above.

Usage

{{main|Page 1|...|Page 15}}
  • Up to 15 parameters are permitted: only the first is mandatory.
  • The list is dynamically generated so that the word "and" is always placed between the final two entries.
  • If more than 15 entries are supplied, a message will be displayed pointing out the problem.
  • You can use parameters l1 to l15 to specify alternative labels for the links.
NB 
make sure to start label parameters with a lowercase el (l), not a one (1) or pipe (|)
adding newline characters will break page links

Example

Code Result
{{main|Page}}
Main page: Page
{{main|Page|Page 2}}
Main pages: Page and Page 2
{{main|Page|Page 2|Page 3}}
Main pages: Page, Page 2, and Page 3
{{main|Page|Page 2|l2=Alternate title for Page 2}}
Main pages: Page and Alternate title for Page 2

And so on up to 15 parameters.

Link to subsection

It possible to direct this template to link a particular section within another page.

{{main|Michael Tritter#storyline|l1=Storyline}} gives

Main page: Storyline

See also