Module:Indicator/doc

This is the documentation page for Module:Indicator

An icon from the Wikimedia Codex library.
This is a documentation subpage for Module:Indicator
It contains usage information, categories, and other content that is not part of the original Module page.
Function list
L 17 — Indicator.main
L 32 — methodtable:getIndicatorData
L 63 — methodtable:renderIndicator
L 121 — Indicator.new

Usage instructions

Namespace names and valid overrides are defined in Module:Indicator/config.json.

Custom configuration can be passed to the constructor.

Indicator.new( {} )

Example

To create an indicator for the page the calling template is transcluded on use the following code.

local indicator = require('Module:Indicator').new()
    indicator:getIndicatorData(mw.title.getCurrentTitle().namespace)
toString( indicator )

To override the namespace provide a valid string as the second aregument.

local indicator = require('Module:Indicator').new()
    indicator:getIndicatorData(mw.title.getCurrentTitle().namespace, self.namespace)
toString( indicator )