On Thu, Dec 1, 2011 at 8:17 AM, Ron Laufer <[email protected]> wrote:

>
> I'm trying to use selective transclusion but via a template and I'm
> running into recursion issues.
>
> I would like to create a template that, when transcluded in a page (call
> it page A), causes that page to have a section surrounded by the
> <onlyinclude></onlyinclude> tags.   Then when I transclude page A in page
> B, only the surrounded section of page A is shown in page B.  The trouble
> of course is that if I put those tags in the template, then they get
> triggered on the first transclusion into page A.   Is there a way to
> "escape" those tags such that each transclusion strips off a layer of
> escaping characters?
>

I'm pretty sure you can't do this; <onlyinclude> etc are interpreted at the
same level of parsing as template invocations; by the time you're expanding
a template you're too deep already.

-- brion
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to