Module:Template wrapper: Difference between revisions
en>Trappist the monk m (doc tweak;) |
en>Trappist the monk (ignore empty or positional default parameters;) |
||
Line 47: | Line 47: | ||
for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters | for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters | ||
if '_template' == k then | if 'string' == type (k) and (v and ('' ~= v)) then -- do not pass along positional or empty parameters | ||
if '_template' == k then | |||
template = v; -- save the name of template that we are wrapping | |||
elseif '_exclude' ~= k then -- _exclude already handled so ignore it here | |||
add_parameter (k, v, args, list); -- add all other parameters to args in the style dictated by list | |||
end | |||
end | end | ||
end | end |