Template:Lua/doc: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{dochead}}
{{dochead|mod=Variable arguments}}{{Template rating|rating=deprecated|details=[[Template:Dochead]] and [[Template:Module introspection]] now fulfil the role of this template, which automatically finds and links to all dependencies.}}
=== Usage ===
{{clear}}{{wikipedia}}{{clear}}
You type:


: <code>{{((}}modlink{{pipe}}Infobox ET{{))}}</nowiki></code>
On templates with modules, this template provides a link from the template or its documentation to the corresponding module.


You get:
=== Usage ===
 
Pass in the name of all modules used for a given template, separated by pipe characters:
: {{{{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>{{{{ROOTPAGENAME}}|Infobox ET|Utils}}</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}}
|}


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