Template:Ctg/doc: Difference between revisions

no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 10:
** Subpages are handled similarly; e.g. [[Slayer/Level up table|'''Slayer'''/Level up table]] will be sorted as <code><nowiki>[[Category:Slayer|Level up table]]</nowiki></code>
 
This template is not a tool that should be used directly on mw.pages, as it is more efficient for the page itself to use standard categorisation. The main purpose of this tool is to provide categorisation rules for navboxes to mass categorise and sort mw.pages.
 
;Usage
Line 22:
</pre>
 
Placed on most mw.pages, this would produce
:<code><nowiki>[[Category:Rune]][[Category:Mining]]</nowiki></code>.
 
Line 63:
 
;<nowiki>::remove[text]</nowiki>
The <code>::remove[text]</code> will tell the module to remove the <code>text</code> argument from the beginning of pagenames to use as their sort key. If this function is not specified, then the category's name exactly will be used. Likewise, defining this function will not remove the category name from mw.pages for sorting; however, it will still sort exact matches to the front.
 
For example, <code><nowiki>{{ctg|Burnt food::remove[burnt]}}</nowiki></code> would add [[:Category:Burnt food]] to [[Burnt shark]] as <code><nowiki>[[Category:Burnt food|Shark]]</nowiki></code>.