Template talk:If pagename transclude

From Knot Atlas
Jump to navigationJump to search

This template does a type of conditional transclusion; if you're on the page named in the first argument, then transclude the page named in the second argument. It's main use is to prevent the Manual Table of Contents being transcluded multiple times in Printable Manual.

For each pagename you'd like to test against, you need to create a new template. For example, if you want to be able to use

{{If pagename transclude|Sandbox|Data:7_5/Signature}}

you need to create a page Template:CallSandbox, with content

{{{{{Sandbox}}}|{{{1}}}|{{{2}}}|{{{3}}}}}

See also Template:If pagename, Template:If pagename transclude and Template:If not pagename transclude, for each of which the same note applies.