Transclude/doc

From Honkai: Nexus Anima Wiki
Revision as of 13:06, 1 September 2025 by Raven.Familiar (talk | contribs) (Taken from HSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is the documentation page for Transclude.
It contains usage information, categories, and other content not part of the original template page.

Used to Transclude articles and sections of articles by using the parser tags {{#lsth:}} and {{#lst:}}.

Any attempt at invalid transclusion will add the article to Category:Pages with Invalid Transclusions.

For the transclusion of repeated name sections, include lua=1 to use Module:Transclude instead of the aforementioned parser functions.

A tracking category will be added to the page if some specific section is transcluded, which can be one of the following:

Syntax

Header Section Transclusion

{{Transclude|page name|section name}}

Labeled Section Transclusion

{{Transclude|page name|section name|section = 1}}

Examples

Default Transclude

{{Transclude|Nanafey|Description}} yields:


Transclude with main link

{{Transclude|Trait|Known Traits|main = 1}} yields:

Icon Trait
Biggun Biggun
Blaster Blaster
Cherubim Cherubim
Explorer Explorer
Gladiator Gladiator
Hothead Hothead
Mascot Mascot
Mastermind Mastermind
Protector Protector
Spook Spook
Striker Striker

Transclude before first heading with link

{{Transclude|Blaster|main = 1}} yields:


Blaster is one of the Traits possessed by Anima in Honkai: Nexus Anima.


Transclude section with main, label, and link to top

{{Transclude|Kiana|Introduction|top = 1|main = 1|section = 1|label = Animaster}} yields:

Advanced Usage

Template and module code can detect whether they are being transcluded by this template by checking the value of {{#var:transclude}}.

From template code

{{#ifeq:{{#var:transclude}}|1|I'm being transcluded!|I'm not being transcluded.}}

From module code

if tonumber(frame:callParserFunction('#var:transclude', '') or '0') == 1 then
	-- special logic for transclusions
end

Example implementation: Module:Shop

Template Data

Used Transclude articles and sections of articles.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page1 page

Page Name

Stringrequired
Heading2 heading

Heading Name

Stringsuggested
Use Sectionsection

Set to 1 to use {{#lst:}}

Booleanoptional
Show Main Linkmain

Set to 1 to use {{Main}}

Booleansuggested
Main Labellabel

Label of the Main Link

Stringoptional
Link to Toptop

Set to 1 to set Main Link to Top of Page

Booleanoptional
Repeated Sectionlua

Include to allow the transclusion of repeated named sections by utilizing the module version instead of the parser function

Booleanoptional