Template:Hidden code

From bg3.wiki
Revision as of 01:26, 7 June 2024 by Taylan (talk | contribs) (Improve code and explain implementation details in a comment.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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:

First paragraph.

{{#lvardef: var1 | Value 1 }}

Second paragraph.

The variable definition in the middle will be parsed as an empty paragraph so the result will look like this:

First paragraph.


Second paragraph.

Using this template fixes the problem:

First paragraph.

{{hidden code|
{{#lvardef: var1 | Value 1 }}
}}

Second paragraph.

Result:

First paragraph.

Second paragraph.