Sticking with client-side solutions, you could wrap your template "T" in a classed <div> like so:
<div class="template-T"> Your content </div>
then insert a rule into your MediaWiki:Common.css:
.template-T ~ .template-T, .template-T ~ * .template-T { display: none; }
By combining child and general sibling selectors you should be able to cover most cases.
Il 03/03/2015 17:27, Daniel Barrett ha scritto:
Is there a way to construct a template that appears on a page only once, even if it's transcluded multiple times?
For example, if the template "T" contains the word "foo", then:
{{T}} {{T}} {{T}} {{T}}
would display as "foo", not "foo foo foo foo".
My use case is that "T" contains a navigation menu. I want to make sure it never appears more than once on any page.
Thanks, DanB
My email address has changed to danb@cimpress.com. Please update your address book.
Cimpress is the new name for Vistaprint NV, the world’s leader in mass customization. Read more about Cimpress at www.cimpress.com.
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l