Template:Navbox/doc: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
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==

Navigation menu