Last modified: 2006-07-17 18:35:10 UTC
This has almost certainly been raised before, but I can't find it. Simply put, given page X which contains the text [[Category:Foo]], and page Y which contains {{X}}, then page Y behaves as if it contained [[Category:Foo]]. This is often, but not always, a good thing. In the cases that it is not, the only workaround (putting <nowiki> around the original [[Category:Foo]]) is a bit awkward, and may not always be possible if the page is protected. One case when it can be annoying is if an official policy page on wikipedia gets transcluded into someone's user space, for example. Possible suggestions: * Tag categories as only applying to pages in a certain namespace ({{catnamespace|Wikipedia}} on category page) * Allow categories to explicitly disclaim certain entries ({{exclude:X}} on category page) * Allow categories to exclude all transcluded references (__NOTRANSCLUDE__ on category page) * Allow pages to de-categorise. In the example above, [[Remove:Category:Foo]] on page Y. * Allow "static" transclusions, whereby no categories are transcluded (or possibly work in one direction only), and possibly even "what links here" links are not carried over. Somewhat of a blend of subst: and normal transclusion, except that categories are handled specially: {{static:X}} on page Y.
Wrap the categories in the page with <noinclude> tags.
[ack, typo above: I meant <noinclude> not <nowiki>...] Counter example: http://en.wikipedia.org/wiki/Wikipedia:Template_messages/Project_namespace (note all the categories this page supposedly belongs to) It transcludes the template {{policy}}, which has a category in it. If we wrapped that [[Category:]] ref in <noinclude>, then it would not work in the right places (notably, wikipedia policy pages). Solutions 2, 4 and 5 above would work here. (noinclude also doesn't help in cases where the original page can't be modified, such as for protected templates)
Then ask an admin to change the template.
Hi. See also bug 4407 and its workaround using ParserFunctions
Thanks. That, and splitting the template into two halves seem like the best (only) workarounds. The two-halves solution isn't necessarily bad, if it was standardised: {{delete}} transcludes {{delete-nocat}} and just adds [[Category:...]] Then, in most cases, people would add {{delete}}, but when people just want to display the category, they would use {{delete-nocat}}.
*** Bug 6720 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 835 ***