Changes

Jump to navigation Jump to search
m
1 revision
{{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 template directly, use {{tl|category handler}} instead. This template is called from {{tl|category handler}}, see user documentation there.

But if you came here to see or update the '''category suppression blacklist''', then you are in the right place.

=== Updating the blacklist ===

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.

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.

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.

=== Testing the blacklist ===

There are two ways you can test what this blacklist returns for a page:

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:

:<code><nowiki>+{{category handler/blacklist}}+</nowiki></code>

Which here on this page returns this:

:+{{category handler/blacklist}}+

The ++ used here is a simple way to make it visible when a template returns an empty string.

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:
:<code><nowiki>+{{category handler/blacklist| page = User:Example }}+</nowiki></code>
:<code><nowiki>+{{category handler/blacklist| page = User:Example/Archive 5}}+</nowiki></code>

Which returns this:

:+{{category handler/blacklist| page = User:Example }}+
:+{{category handler/blacklist| page = User:Example/Archive 5 }}+

=== Technical details ===

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.

=== See also ===

* [[w:Wikipedia:Category suppression]] – The how-to guide.

<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Utility templates]]

</includeonly>

Navigation menu