FANDOM


--
-- Part of {{Navbox}}
-- Adds categories and {{Navbox/doc}} as required
-- Can be merged into [[Module:Navbox]] when {{NAMESPACE}} magic word becomes available in Scribunto
--
 
local p = {}
 
function p.meta ( frame )
 
    local ns = mw.ustring.lower( frame.args[ns] )
    local base = frame.args[base]
    local page = frame.args[page]
    local args = frame:getParent().args
    local text = ''
 
    if ns == 'template' then
        text = text .. '[[Category:Navigational templates|' .. page ..']]'
 
        if base ~= 'Navbox' and args['subgroup'] == 'yes' and args['collapsible'] == 'yes' and args['doc'] ~= 'no' then
            text = text .. '{{Navbox/doc}}'
        end
    end
 
end
 
function p.test ( frame )
    return frame:preprocess( 'base={{BASEPAGENAME}}, ns={{NAMESPACE}}, page={{PAGENAME}}' )
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.