Module:Sidebar: Difference between revisions
Appearance
fix |
breaking more wikis |
||
Line 47: | Line 47: | ||
--[[ | --[[ | ||
Finds whether a sidebar has a subgroup sidebar. | Finds whether a sidebar has a subgroup sidebar. | ||
]] | ]] | ||
local function hasSubgroup(s) | local function hasSubgroup(s) | ||
if mw.ustring.find(s, cfg.i18n.pattern.subgroup | if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then | ||
return true | return true | ||
else | else | ||
Line 77: | Line 74: | ||
-- force collapsibleclass to be sidebar-collapse otherwise output nothing | -- force collapsibleclass to be sidebar-collapse otherwise output nothing | ||
:addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) | :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) | ||
:addClass('nomobile') | :addClass('nomobile') | ||
:addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) | :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) | ||
Line 256: | Line 252: | ||
end | end | ||
local | local base_templatestyles = frame:extensionTag{ | ||
name = 'templatestyles', args = { src = cfg.i18n.templatestyles } | name = 'templatestyles', args = { src = cfg.i18n.templatestyles } | ||
} | } | ||
Line 262: | Line 258: | ||
local templatestyles = '' | local templatestyles = '' | ||
if args['templatestyles'] and args['templatestyles'] ~= '' then | if args['templatestyles'] and args['templatestyles'] ~= '' then | ||
templatestyles = | templatestyles = frame:extensionTag{ | ||
name = 'templatestyles', args = { src = args['templatestyles'] } | name = 'templatestyles', args = { src = args['templatestyles'] } | ||
} | } | ||
Line 269: | Line 265: | ||
local child_templatestyles = '' | local child_templatestyles = '' | ||
if args['child templatestyles'] and args['child templatestyles'] ~= '' then | if args['child templatestyles'] and args['child templatestyles'] ~= '' then | ||
child_templatestyles = | child_templatestyles = frame:extensionTag{ | ||
name = 'templatestyles', args = { src = args['child templatestyles'] } | name = 'templatestyles', args = { src = args['child templatestyles'] } | ||
} | } | ||
Line 276: | Line 272: | ||
local grandchild_templatestyles = '' | local grandchild_templatestyles = '' | ||
if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then | if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then | ||
grandchild_templatestyles = | grandchild_templatestyles = frame:extensionTag{ | ||
name = 'templatestyles', args = { src = args['grandchild templatestyles'] } | name = 'templatestyles', args = { src = args['grandchild templatestyles'] } | ||
} | } | ||
Line 282: | Line 278: | ||
return table.concat({ | return table.concat({ | ||
base_templatestyles, | |||
templatestyles, | templatestyles, | ||
child_templatestyles, | child_templatestyles, |