Forum:Suppressing Normal CategoryTransclusion inTemplates

How do I add a template to a page without transcluding the categories into that page? I'm asking about uncyclopedia, if that helps. I asked Spang about it, and he said using the code:

in lieu of the normal template code, ie

However, that appears not to be working, it doesn't show anything. Also, the old trick of placing the template in a choose command with only 1 option doesn't work either. --Mnbvcxz3 05:13, September 24, 2009 (UTC)


 * Have you tried to put all you do not want to be included inside ? --Ciencia Al Poder (talk) -WikiDex 09:16, September 24, 2009 (UTC)


 * Alternatively, everything you do want to be included between .--AB 09:35, September 24, 2009 (UTC)
 * That is not what I'm trying to do. Basically, I want to add a template that normally should and does add a category without adding that category.  Mainly, its to prevent recursive categorization (i.e. a category containing itself) when I add a sectional template to a category page. --Mnbvcxz3 15:28, September 24, 2009 (UTC)


 * Add a parameter to the template and if that parameter is specified, the category isn't included. For example,  . If you want the tempate to not categorize the article where it's placed, call it with a nocategory=1 parameter --Ciencia Al Poder (talk) -WikiDex 15:53, September 24, 2009 (UTC)

Depending upon where you plan to use the template a test for the NAMESPACE magicword may prove useful. viz.

In this case the template adds the category when it is transcluded at a page in the User: namespace but does not add the category when it is transcluded in any other namespace. The example this was taken from is w:c:vsk:MediaWiki:Welcome-user-page/pushed_messages

--najevi 17:17, September 24, 2009 (UTC)
 * Thanks, but is there a way to suppress the category without using parser functions in the template? Spang suggested a similar method, but he said that it would be rather bandwidth heavy to add parser functions to a template just to effect how it will transclude on one page.  Basically, I would prefer if the changes to done at the page where the template is transcluded, not in the template itself.  Ideally, a working version of something like Spang's suggestion of:

--Mnbvcxz3 06:18, September 25, 2009 (UTC)


 * An   isn't expensive. But a dpl query, as you propose, is very expensive. --Ciencia Al Poder (talk) -WikiDex 14:26, September 25, 2009 (UTC)
 * Thanks, right now I'm trying

from Spang's suggestion of

and its not working. I think my only problem is that I'm putting the pagename of the category in wrong. I.e. its in the wrong format or something. If I substitute a mainspace page name, its working right. --Mnbvcxz3 16:26, September 25, 2009 (UTC)