On 10-09-16 09:36 AM, Guy Y wrote:
> I have an unexpected behavior that only occurs in the following
> situation:
> 
> We have a template on many pages that has "Category:Exclude in print"
> on it. On almost every page, it excludes the template, and the page
> excludes normally.
> 
> However, we have a series of pages that are in a namespace
> "Training:", and for these pages the same set-up excludes the entire
> page from render. If I remove the tag from the template, everything
> renders fine.
> 
> The current workaround is to not have the template on that page
> excluded from print, but we'd like that template not to appear in
> print on that page.

I'm not really sure this is what you're looking for but I'm using a
template to exclude some parts of a page. In my case, I apply this
inside other templates that should not be shown in pdf documents.

The template is named "Do not print" and its trick is to use the exclude
category inside of a noinclude tag:

<noinclude>some explanation of this template
[[Category:Exclude in print]]</noinclude><includeonly>{{{1|}}}</includeonly>

and I use it like so:

{{Do not print|1=content
can be pretty much anything}}

-- 
Gabriel Filion

-- 
You received this message because you are subscribed to the Google Groups 
"mwlib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mwlib?hl=en.

Reply via email to