exclude template's categories in certain pages
Closed, ResolvedPublic


Author: stanley

In some case, we need to put a template just for display the template content as
an example, therefore, the page should not be in the same categories as other
pages contains the template.

For example: template {{delete}} contains information "this page is will be
deleted" and [[Category:Pages for deletion]].

If I put the template on article foo_vandal_article. It mean I intend to request
the page "foo_vandal_article" for deletion. But if I put the template on article
"Wikipedia:Template_list", of course I not intend to request the page
"Wikipedia:Template_list" for deletion and therefore "Wikipedia:Template_list"
should not have and be categorized into [[Category:Pages for deletion]].

It would be nice if there some tag to supress the category from the template
such as :

Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Templates.Via ConduitNov 21 2014, 9:00 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz4407.
bzimport created this task.Via LegacyDec 28 2005, 8:13 AM
bzimport added a comment.Via ConduitDec 28 2005, 9:09 AM

stanley wrote:

There is one way to do it:(ex: template {{delete}} at comment #1)

1.Create new template {{delete-base}} contains "this page will be deleted"
2.Modify template {{delete}} contains "{{delete-base}} [[Category:Pages for
3.All vandal articles will use {{delete}}
4.Wikipedia:Template_list will use {{delete-base}}
5.Modification only need to be done at {{delete-base}} / no redundant work here.

This will work, but need to create 2 pages for 1 template (I myself dont like
it). So I still request this enhancement / new syntax as comment #1

bzimport added a comment.Via ConduitJan 6 2006, 4:01 PM

gangleri wrote:

from IRC:

Borgx is asking for <nocategory>{{delete}}</nocategory>. This would suppress the
transclusion of *all* categories.

This is not the same as
Bug 706: syntax such that a (template) page can be un-categorized, but still
categorise pages transcluding it
Bug 706 is about <foo> ... </foo> control inside the template; the actual
request is about syntax at the page where the temlate is included.

lists itself at

However Borgx want to generate
automatically without manual copying and updating.

Best regards reinhardt [[user:gangleri]]

bzimport added a comment.Via ConduitJan 6 2006, 7:46 PM

robchur wrote:

You should avoid transcluding a load of pages on a page like that, regardless.
Just subst into a table and do periodic updates. Or list plain text:


bzimport added a comment.Via ConduitJan 11 2006, 5:21 AM

stanley wrote:

The idea of transcluding the templates into a list page is for making easy of
people whenever they want to review it. Plain text like {{[[Template:delete]]}}
or en:'s {{tl|delete}} will making it hard because one have to click the
template one by one just for seeing it.

Loading just the template's codes using {{msgnw}} also making it hard because
periodic updates is needed. Can u imagine how to maintain updates when such a
list contains 100> templates.

bzimport added a comment.Via ConduitMar 7 2006, 6:53 PM

mediazilla wrote:

The ability to transclude a load of templates without needing to subst: and periodically update would also be useful to
average wiki users, not just maintainers of central lists. See


A <nocategory> tag would be perfect.

Phil_Boswell added a comment.Via ConduitApr 26 2006, 11:14 AM

Maybe a new magic word could be considered: {{nocat:some template}} would
transclude [[template:some template]] but ignore any categories included therein.

bzimport added a comment.Via ConduitApr 26 2006, 1:20 PM

rotemliss wrote:

A workaround, implemented in some of the Hebrew projects: using a new template
named "Template Category" (in Hebrew, [[he:Template:קטגוריה בתבנית]]), which
includes (originally used the local [[Template:Qif]], I'm not sure it's the
correct syntax for #if):

{{#if: {{{NoCategory|}}} | {{{1}}}}}

and including the following text for categories:

<includeonly>{{Template Category|[[Category:Blah Blah

Then, using the parameter "NoCategory=yes" when calling a template will exclude
the category. (It can be used also for Interwiki links, etc.)

It is used successfully in the Hebrew projects, however it's just a workaround,
and we better use a new magic word.

bzimport added a comment.Via ConduitJun 15 2006, 7:47 AM

bugs wrote:

I raised this issue at #6293 (thanks Borgx for pointing this out).

Two other possible solutions I had:

  • Allow categories to explicitly disclaim certain entries

({{exclude:Wikipedia:Template list}} on
category page)

  • Allow pages to de-categorise. In the example above, [[Remove:Category:Pages

for deletion]] on
page [[Wikipedia:Template list]].

But <nocat> would be pretty good. Something similar could be done to prevent
"what links here" from including links in transcluded pages, when desirable.

bzimport added a comment.Via ConduitJun 21 2006, 1:07 AM

ayg wrote:

I believe this is a duplicate of Bug 835, no?

bzimport added a comment.Via ConduitJun 21 2006, 1:24 AM

robchur wrote:

*** This bug has been marked as a duplicate of 835 ***

Add Comment