You may be able to do better just by making some kind of extension to add the <noinclude> around the category tags in the desired B pages.
JH
On May 24, 2008, at 8:35 PM, The Gadget Doctor wrote:
No, there doesn't seem much life in nesting <include> directives.
At the moment I'm working on a fairly complex system of comparing the calling page name to some of the items in the template. If these two things match, then I know the template is being called in such a way that it is correct to tag that page. I'm actually creating the pages solely to call the template once. I than transclude those pages across the site. This gives me some rather interesting sorting when used with Semantic MediaWiki and DPL2.
The problem I've run into is if there is any sort of punctuation or special characters in the page name ' " etc then my #ifeq comparison fails. I'm not sure exactly why but I can think of many reasons this happens.
Gadgetdoctor
On Sat, May 24, 2008 at 5:54 PM, Jim Hu jimhu@tamu.edu wrote:
I'm wondering how various nestings of noinclude, includeonly, and nowiki might behave. Not well, I'm guessing...
On May 24, 2008, at 4:16 PM, Platonides wrote:
The Gadget Doctor worte:
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
I don't think there's a way only with <onlyinclude> & Co. The easiest would be passing from page B a parameter to the template which defines if the categories shall appear or not. Then conditionally define it. So it could be somehting as ugly as: {{MyTemplate|addcategory={{#if:<includeonly>1</includeonly>|no| yes}} }}
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054