Template:Hidden code
Jump to navigation
Jump to search
Template documentation
This template allows having pure code somewhere in a page's source without disturbing the output. For example, variable definitions, or uses of the {{#seo:}}
tag.
Consider the following example; the variable definition in the middle is parsed as an empty paragraph:
Markup
First paragraph. {{#lvardef: x | Blah blah }} Second paragraph: {{#lvar:x}}Renders as
First paragraph.
Second paragraph: Blah blah
Using this template fixes the problem:
Markup
First paragraph. {{hidden code| {{#lvardef: x | Blah blah }} }} Second paragraph: {{#lvar:x}}Renders as
First paragraph.
Second paragraph: Blah blah
Note: This would normally add <span class="bg3wiki-hidden-code"></span>
to the HTML output for the page. (Possibly wrapped in a <p></p>
element.) That's benign, since empty text has a height of zero. However, for additional HTML tidiness, some custom code in the wiki's configuration strips that out completely.