Transclude
Note: parts of or the entire template might not be visible without values provided.
| Main | Documentation | Usage |
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:
- Dialogue: Category:Pages Transcluding Dialogue
- Other Languages: Category:Pages Transcluding Other Languages
- Trivia: Category:Pages Transcluding Trivia
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
| Icon | Trait |
|---|---|
| Biggun | |
| Blaster | |
| Cherubim | |
| Explorer | |
| Gladiator | |
| Hothead | |
| Mascot | |
| Mastermind | |
| Protector | |
| Spook | |
| Striker |
- Transclude before first heading with link
Blaster is one of the Traits possessed by Anima in Honkai: Nexus Anima.
- Transclude section with main, label, and link to top
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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page | 1 page | Page Name | String | required |
| Heading | 2 heading | Heading Name | String | suggested |
| Use Section | section | Set to 1 to use {{#lst:}} | Boolean | optional |
| Show Main Link | main | Set to 1 to use {{Main}} | Boolean | suggested |
| Main Label | label | Label of the Main Link | String | optional |
| Link to Top | top | Set to 1 to set Main Link to Top of Page | Boolean | optional |
| Repeated Section | lua | Include to allow the transclusion of repeated named sections by utilizing the module version instead of the parser function | Boolean | optional |