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(a)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