Template:Navbox/doc: Difference between revisions

no edit summary
(Created page with "{{documentation|Template:Navbox}} {{invokes|Navbox|category=No}}<!----Do not add this category to *every* navbox added explicitly to {{Navbox}} at the end of documentation-----> __TOC__<!--Needed to prevent TOC appearing in the navbox itself if it has a heading.--> ==Usage== This template can be used to make a standard navigation box. It is intended for use within another template that standardises the title and contents of the box (see Template:Rune equipment...")
 
No edit summary
Tag: Reverted
Line 129:
 
==Categorising==
Navboxes are useful for transcluding categories onto a large number of mw.pages that share both a trait and the navigation box. For example: [[Template:Rune equipment]] transcludes [[:Category:Rune]] onto every page that uses it.
 
There are 2 methods of categorising mw.pages with navboxes:
 
The preferred method is to use '''{{t|Ctg}}'''. This has the most simple rules but is the easiest to use.
Line 141:
</pre>
 
This code tells the template to add [[:Category:Barbarian mixes]] to mw.pages only if their title ends with the string "mix". <code><nowiki>{{ctg|Barbarian mixes::ifmatches[mix]}}</nowiki></code> would '''not''' work here, because several mw.pages include the substring "mix" in other locations, and they would be improperly categorised.
 
Categorisation should only be used on a template for large-scale addition. For small numbers of mw.pages it is simpler to directly add the category to each page.
 
==Examples==