Template:Lua: Difference between revisions

From wizzypedia
Jump to navigation Jump to search
terraria>Westgrass
No edit summary
m (1 revision imported)
Line 1: Line 1:
<includeonly><!--
<includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude>
// localization info is autoloaded from Template:Lua/l10n
{{Lua|Module:Lua banner}}
 
{{documentation}}
 
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
-->{{#vardefine:lua:modulelist|{{#fornumargs:_|v|₪{{#var:v}}}}}}<!-- store all unnamed parameters to the variable
-->{{#ifexpr:{{#lstcnt:{{#var:lua:modulelist}}|₪}}||{{#vardefine:lua:modulelist|{{ROOTPAGENAME}}}}}}<!-- default to rootpagename
 
-->{{#vardefine:lua:modulestring|<!-- combine the module names into a comma-separated string
-->{{comma/start}}<!--
-->{{#arraydefine:x|{{#var:lua:modulelist}}|₪}}{{#arrayunique:x}}{{#arrayprint:x||@@@@|<!--
-->{{comma/item|<b>[[{{ns:Module}}:{{ucfirst:@@@@}}]]</b>}}<!--
-->|}}<!--
-->{{comma/end}}<!--
-->}}<!--
 
// output
-->{{msgbox<!--
-->|imagealt=[[File:Lua.svg|32px|link=|{{l10n|lua|image_hovertext}}]]<!--
-->|text={{l10n|lua|text|$modules_str$={{#var:lua:modulestring}}|$modules_cnt$={{#lstcnt:{{#var:lua:modulelist}}|₪}}}}<!--
-->}}<!--
 
// cate
-->{{#if:{{bool|{{{nocat|}}}}}||[[Category:{{l10n|lua|cate}}]]}}<!--
 
--></includeonly><noinclude>{{i18n-ready}}{{doc}}
{{language info|en=Template:Lua}}
</noinclude>
</noinclude>

Revision as of 21:16, 30 June 2022

Used to create documentation for templates

Usage

There are two ways to use this template.

1. Add to the bottom of your template:

<noinclude>{{doc}}<noinclude>

Then click on the "Create" link to get started with your documentation.

2. Include the documentation directly in the template (not preferred method):

<noinclude>{{doc|text=
Documentation text

==Usage==
How to use the template, etc.
}}<noinclude>