[Mediawiki-l] Putting Categories in a Template... how to make them get transcluded only once

The Gadget Doctor mediawiki at thegadgetdoctor.com
Sat May 24 17:10:47 UTC 2008


I'm having a bit of a fight with the <onlyinclude> <includeonly> and
<noinclude> tags and transclusion.

I would like to have a template that passes a category on once only:

Page A   ->  Page B  ->  Template

Page A transcludes Page B
Page B transcludes Template

I would like a category to be applied to Page B (from the template)
but not to Template or Page A.

I can apply the category to Page B and not Template with the following
on the template:

<includeonly>[[Category:Web Citation]]</includeonly>

But that then gets passed on to Page A if I transclude Page B.

I'm sure there's a way, I'm just stumped!

GadgetDoctor



More information about the MediaWiki-l mailing list