Template:Transclude guard
Revision as of 05:37, 21 August 2024 by Pseudosphere (talk | contribs)
{{{2}}}
This should allow defining regions which appear only the first time a template is transcluded on a page.
The first parameter should be a value unique to that instance of {{Transclude guard}}
, such as the its name (WARNING: {{PAGETITLE}}
will resolve to the target page's name).
Example
Template:Examplepage
's source:
{{Transclude guard|Examplepage|This only appears once!}} Lorem ipsum. {{Transclude guard|Examplepage2|This also only appears once!}} <hr/>
Target page's source:
{{Examplepage}} +++++++++++++++ {{Examplepage}} {{Examplepage}}
Resulting content of target page:
This only appears once! Lorem ipsum. This also only appears once! <hr/> +++++++++++++++ Lorem ipsum. <hr/> Lorem ipsum. <hr/>