Jump to content

Module:TOCyears/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 13:06, 3 October 2014 (create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This module implements various table of contents (TOC) templates. At the moment, it implements {{TOCyears}} and {{List TOC}}.

Usage

Avaiable functions

#invoke function Lua function Template
years _years {{TOCyears}}
list _list {{List TOC}}

From wikitext

From wikitext this module should usually be used through one of the templates in the table above. However, it is also possible to use it with the following syntax:

{{#invoke:TOC|function|args}}

The function names are listed in the table in the "#invoke function" column, and args are the arguments that would normally be added by the template. Please see the template documentation for each template for available parameters.

From Lua

Load the module like this:

local mTOC = require('Module:TOC')

You can then use the functions with the following syntax:

mTOC.func(args)

"func" should be changed to one of the Lua function names in the table above. These all start with an underscore ("_"). The args variable is a table of arguments to be passed to the function. Please see the template documentation for available arguments.