Template:Lua/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}{{wikipedia}}{{{{ROOTPAGENAMEE}}|Variable arguments}}
On templates with modules, this template provides a link from the template or its documentation to the corresponding module.
 
=== Usage ===
=== Usage ===
You type:
Pass in the name of all modules used for a given template, separated by pipe characters:
 
: <code>{{((}}modlink{{pipe}}Infobox ET{{))}}</nowiki></code>
 
You get:
 
: {{{{ROOTPAGENAME}}|Infobox ET}}
 
For templates that use multiple modules, it's best to place the modlink at the end of the list.
 
For example:
 
: <code><nowiki>[[Module:Utils]] and {{modlink|Infobox ET|plural=yes}}</nowiki></code>


gives:
{| class="wikitable"
|-
! You type !! You get
|-
| <code><nowiki>{{lua|Infobox ET}}</nowiki></code> || {{{{ROOTPAGENAMEE}}|Infobox ET}}
|-
| <code><nowiki>{{lua|Infobox ET|Utils}}</nowiki></code> || {{{{ROOTPAGENAMEE}}|Infobox ET|Utils}}
|}


: [[Module:Utils]] and {{{{ROOTPAGENAME}}|Infobox ET|plural=yes}}
If no argument is passed, there will be a single link to the module with the same name as the template.

Latest revision as of 18:35, 14 August 2025

English Wikipedia has an article on:

On templates with modules, this template provides a link from the template or its documentation to the corresponding module.

Usage

Pass in the name of all modules used for a given template, separated by pipe characters:

You type You get
{{lua|Infobox ET}}
{{lua|Infobox ET|Utils}}

If no argument is passed, there will be a single link to the module with the same name as the template.