Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
rewrite argument handling
Jackmcbarn (talk | contribs)
don't use frame:preprocess unnecessarily
Line 283:
 
local function renderTrackingCategories(builder)
local frametitle = mw.getCurrentFrametitle.getCurrentTitle()
if mwtitle.ustring.sub(s,namespace 1, 1) =~= '0'10 then return end -- not in template space
local subpage = title.subpageText
if not frame then return end
local s = frame:preprocess('{{#ifeq:{{NAMESPACE}}|{{ns:10}}|1|0}}{{SUBPAGENAME}}')
if mw.ustring.sub(s, 1, 1) == '0' then return end -- not in template space
local subpage = mw.ustring.lower(mw.ustring.sub(s, 2))
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end