Module:Subject bar/doc: Difference between revisions
Appearance
Content deleted Content added
{{high use}} |
Trialpears (talk | contribs) →Use from another Lua module: remove books since that is disabled |
||
Line 16: | Line 16: | ||
<syntaxhighlight lang="lua"> |
<syntaxhighlight lang="lua"> |
||
local myBar = subjectBar{ |
local myBar = subjectBar{ |
||
book = 'Book 1', |
|||
book2 = 'Book 2', |
|||
-- ... |
|||
portal = 'Portal 1', |
portal = 'Portal 1', |
||
portal2 = 'Portal 2', |
portal2 = 'Portal 2', |
Revision as of 20:15, 1 May 2021
![]() | This Lua module is used on approximately 19,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
![]() | This module uses TemplateStyles: |
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.
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.