Template:Transclude

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Transclude/l10n for the localization of this template.
Template-info.svg Documentation The documentation below is transcluded from Template:Transclude/doc. (edit | history)

Use this template to transclude content from another page, displaying a notice box.

Usage

{{ transclude | <page> | section = <section as defined on page> (optional) | onlybox = y/yes (optional) | nobox = y/yes (optional) | clr = y/yes (optional) }}

First unnamed parameter

Page to transclude. Usually, it should transclude the entire page. This might vary depending on the usage of <noinclude>, <onlyinclude>, and <includeonly> tags on the page.

It is possible to append a section to the first unnamed parameter, separated by the # character (e.g. Iron Pickaxe#Crafting), in order to only transclude the content below that section's heading.

section

If a specific section was predefined on the page which is to transclude (using the <section> tags), use this parameter to transclude that section.

onlybox

Disables all transclusion entirely and only outputs the message box.

nobox

Disables the display of the message box.

clr

Inserts a clear after the message box. Useful for transclusion of large content that would otherwise be deprived of significant amounts of horizontal space due to the box.

(custom)

This template takes all other parameters passed to it and puts them in dplvars as follows: {{#dplvar:set|_transclude_<custom parameter name>|<custom parameter value>}}.

This can be utilized to exclude a specific part of a page from transclusion. See Guide:Practical Tips#Combat, which is transcluded on Guide:Eater of Worlds strategies#General Strategies, for an example.

In addition, the dplvar _transclude-istranscluding is set to y when the text is transcluded, but not on its source page. This facilitates, for instance, preventing self-links on the source page which would turn into bold text.