FANDOM


(Created page with "Okay so there are two ways categories can be put on a page via wikitext and they do different things... # <code><nowiki>SORTKEY</nowiki></code> #:whe...")
 
Line 3: Line 3:
 
#:where this appears the page it is on will be added to the category called CATEGORYNAME; the entry in the category list will sort based on the SORTKEY (using just a space character: like <code><nowiki>[[Category:CATEGORYNAME| ]]</nowiki></code>, will sort it above everything else rather than putting it under a number or letter); nothing will be seen on the page itself where this wikitext is included
 
#:where this appears the page it is on will be added to the category called CATEGORYNAME; the entry in the category list will sort based on the SORTKEY (using just a space character: like <code><nowiki>[[Category:CATEGORYNAME| ]]</nowiki></code>, will sort it above everything else rather than putting it under a number or letter); nothing will be seen on the page itself where this wikitext is included
 
# <code><nowiki>[[:Category:CATEGORYNAME|LINK_TEXT]]</nowiki></code>
 
# <code><nowiki>[[:Category:CATEGORYNAME|LINK_TEXT]]</nowiki></code>
#:this just creates a link to the category page at <tt>Category:CATEGORYNAME</tt>
+
#:this just creates a link to the category page at <tt>Category:CATEGORYNAME</tt> and only a link called LINK_TEXT will actually be visible.
   
 
So, if you want to include a page where the template is used in a category, use the first type and if you just want a link, use the second type. If you want to do both, you need to use both types, i.e. <code><nowiki>[[:Category:{{{gender}}}|{{{gender}}}]][[Category:{{{gender}}}|{{{gender}}}]]</nowiki></code>
 
So, if you want to include a page where the template is used in a category, use the first type and if you just want a link, use the second type. If you want to do both, you need to use both types, i.e. <code><nowiki>[[:Category:{{{gender}}}|{{{gender}}}]][[Category:{{{gender}}}|{{{gender}}}]]</nowiki></code>

Revision as of 02:00, November 9, 2019

Okay so there are two ways categories can be put on a page via wikitext and they do different things...

  1. [[Category:CATEGORYNAME|SORTKEY]]
    where this appears the page it is on will be added to the category called CATEGORYNAME; the entry in the category list will sort based on the SORTKEY (using just a space character: like [[Category:CATEGORYNAME| ]], will sort it above everything else rather than putting it under a number or letter); nothing will be seen on the page itself where this wikitext is included
  2. [[:Category:CATEGORYNAME|LINK_TEXT]]
    this just creates a link to the category page at Category:CATEGORYNAME and only a link called LINK_TEXT will actually be visible.

So, if you want to include a page where the template is used in a category, use the first type and if you just want a link, use the second type. If you want to do both, you need to use both types, i.e. [[:Category:{{{gender}}}|{{{gender}}}]][[Category:{{{gender}}}|{{{gender}}}]]

Community content is available under CC-BY-SA unless otherwise noted.