https://wiki.xenproject.org/index.php?title=Template:Category_handler/blacklist/doc&feed=atom&action=historyTemplate:Category handler/blacklist/doc - Revision history2024-03-29T08:42:30ZRevision history for this page on the wikiMediaWiki 1.31.3https://wiki.xenproject.org/index.php?title=Template:Category_handler/blacklist/doc&diff=1309&oldid=prevLars.kurth: Created page with "{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This is the {{tl|category handler/blacklist}} sub-template. Do not use this t…"2011-12-02T00:56:32Z<p>Created page with "{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This is the {{tl|category handler/blacklist}} sub-template. Do not use this t…"</p>
<p><b>New page</b></p><div>{{documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --><br />
<br />
This is the {{tl|category handler/blacklist}} sub-template.<br />
<br />
Do not use this template directly, use {{tl|category handler}} instead. This template is called from {{tl|category handler}}, see user documentation there.<br />
<br />
But if you came here to see or update the '''category suppression blacklist''', then you are in the right place.<br />
<br />
=== Updating the blacklist ===<br />
<br />
This template contains a blacklist of the pages and page types where templates should not auto-categorise. This blacklist is used by {{tlf|category handler}} to decide when not to categorise. To update the blacklist, edit this template.<br />
<br />
This template uses {{tl|if pagename}} to do the pagename-detection, thus see {{tl|if pagename}} for the syntax to use for the blacklist rules.<br />
<br />
When this template is placed on a page that should not categorise, then it should return "hide". And when placed on any other page it should return an empty string.<br />
<br />
=== Testing the blacklist ===<br />
<br />
There are two ways you can test what this blacklist returns for a page:<br />
<br />
You can put this template on the page you want to test, and see what output it produces. You can use edit preview, no need to save. Like this:<br />
<br />
:<code><nowiki>+{{category handler/blacklist}}+</nowiki></code><br />
<br />
Which here on this page returns this:<br />
<br />
:+{{category handler/blacklist}}+<br />
<br />
The ++ used here is a simple way to make it visible when a template returns an empty string.<br />
<br />
Or you can feed the pagename you want to test to this template. Then you can do all the testing for instance on the [[{{pgn|ns|page1|page2}}/testcases|/testcases]] subpage of this template. Like this:<br />
:<code><nowiki>+{{category handler/blacklist| page = User:Example }}+</nowiki></code><br />
:<code><nowiki>+{{category handler/blacklist| page = User:Example/Archive 5}}+</nowiki></code><br />
<br />
Which returns this:<br />
<br />
:+{{category handler/blacklist| page = User:Example }}+<br />
:+{{category handler/blacklist| page = User:Example/Archive 5 }}+<br />
<br />
=== Technical details ===<br />
<br />
Currently this template is only called from {{tl|category handler}}, and indirectly from all templates that use {{tlf|category handler}}. But in the future this template might also be directly called from other templates similar to {{tlf|category handler}}. This means we can update the category suppression blacklist in one place.<br />
<br />
=== See also ===<br />
<br />
* [[Wikipedia:Category suppression]] – The how-to guide.<br />
* [[Wikipedia:WikiProject Category Suppression]] – The WikiProject.<br />
<br />
<includeonly><br />
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --><br />
</includeonly></div>Lars.kurth