Jump to content

Module:Subject bar/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
+dep
link to test cases
Line 3: Line 3:
{{Lua|Module:Portal bar|Module:Sister project links|Module:TableTools|Module:Arguments}}
{{Lua|Module:Portal bar|Module:Sister project links|Module:TableTools|Module:Arguments}}
This module implements the {{tl|Subject bar}} template. Please don't use this module from an article or from another wiki page. You should use the {{tl|Subject bar}} template instead. To use the module from another Lua module, read on.
This module implements the {{tl|Subject bar}} template. Please don't use this module from an article or from another wiki page. You should use the {{tl|Subject bar}} template instead. To use the module from another Lua module, read on.

For test cases, see {{tl|Subject bar/testcases}}.


== Use from another Lua module ==
== Use from another Lua module ==

Revision as of 18:09, 18 September 2022

This module implements the {{Subject bar}} template. Please don't use this module from an article or from another wiki page. You should use the {{Subject bar}} template instead. To use the module from another Lua module, read on.

For test cases, see {{Subject bar/testcases}}.

Use from another Lua module

Load the module like this:

local subjectBar = require('Module:Subject bar')._main

Then you can use the subjectBar function like this:

local myBar = subjectBar{
    portal = 'Portal 1',
    portal2 = 'Portal 2',
    -- ...
    commons = true,
    commons-search = 'Commons search string',
    wikt = true,
    wikt-search = 'Wiktionary search string'
    -- ...
}

Please see Template:Subject bar/doc for a full list of possible parameters.