Module:TOCyears/doc: Difference between revisions
Appearance
Content deleted Content added
m Pppery moved page Module:TOC/doc to Module:TOCyears/doc |
Cleanup after deletion of Template:List TOC |
||
Line 1: | Line 1: | ||
This module |
This module implements {{tl|TOCyears}} |
||
== Usage == |
== Usage == |
||
=== Available functions === |
|||
{| class="wikitable" |
|||
|- |
|||
! #invoke function |
|||
! Lua function |
|||
! Template |
|||
|- |
|||
| years |
|||
| _years |
|||
| {{tl|TOCyears}} |
|||
|- |
|||
| list |
|||
| _list |
|||
| unused |
|||
|} |
|||
=== From wikitext === |
=== From wikitext === |
||
From wikitext this module should usually be used through |
From wikitext this module should usually be used through {{tl|TOCyears}}. However, it is also possible to use it with the following syntax: |
||
{{#invoke:TOC| |
{{#invoke:TOC|years|''args''}} |
||
The function names are listed in the table in the "#invoke function" column, and <var>args</var> are the arguments that would normally be added by the template. Please see the template documentation for each template for available parameters. |
|||
See the documentation of {{tl|TOCyears}} for available parameters. |
|||
=== From Lua === |
=== From Lua === |
||
Line 32: | Line 15: | ||
<syntaxhighlight lang="lua"> |
<syntaxhighlight lang="lua"> |
||
local |
local mTOCyears = require('Module:TOCyears') |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
You can then use |
You can then use it with the following syntax: |
||
<syntaxhighlight lang="lua"> |
<syntaxhighlight lang="lua"> |
||
mTOCyears._years(args) |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
<var>args</var> variable is a table of arguments to be passed to the function. Please see {{tl|TOCyears}} for available arguments. |
|||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| |
|||
<!-- Categories go here and interwikis go in Wikidata. --> |
|||
}}</includeonly> |
Revision as of 17:03, 4 October 2020
This module implements {{TOCyears}}
Usage
From wikitext
From wikitext this module should usually be used through {{TOCyears}}. However, it is also possible to use it with the following syntax:
{{#invoke:TOC|years|args}}
See the documentation of {{TOCyears}} for available parameters.
From Lua
Load the module like this:
local mTOCyears = require('Module:TOCyears')
You can then use it with the following syntax:
mTOCyears._years(args)
args variable is a table of arguments to be passed to the function. Please see {{TOCyears}} for available arguments.