Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
Undid revision 1189718039 by MSGJ (talk) - keep for now
put article_class through custom mask to find value to inherit
Line 250:
args = raw_args
})
if class=='' and article_class and article_class~='' then -- if unassessed and article class exists, check if it can be inherited
local new_arg_table = {}
for arg, val in pairs(raw_args) do
new_arg_table[arg] = val
end
new_arg_table.class = article_class
local article_class_normalised = mw.text.trim(frame:expandTemplate{
title = custom_mask.prefixedText,
args = {class = article_class}new_arg_table
})
if article_class_normalised~='' and article_class_normalised~='' then
article_classclass = article_class_normalised -- useinherit class from article_class normalised by custom mask
else
article_class = nil -- effectively no article_class for this banner