Content deleted Content added
No edit summary |
optional third template |
||
Line 5:
function p.testcase(frame)
local template3 =
local heading1 = args['_heading1'] or '{{[[Template:' .. template1 .. '|' .. template1 ..']]}}' local heading3 = args['_heading3'] or '{{[[Template:' .. template3 .. '|' .. template3 ..']]}}'
local rowheader =
local after = args['_after'] or '' if (template3) then
return mw.ustring.format( [==[
<table%s%s><caption>%s</caption>
<tr>%s<th style="width:33%%">%s</th><th style="width:33%%">%s</th><th style="width:33%%">%s</th></tr>
<tr style="vertical-align:top">%s<td>
%s%s</td><td>
%s%s</td><td>
%s%s</td></tr></table>]==],
tableclass, tablestyle, caption,
heading0, heading1, heading2, heading3, rowheader,
frame:expandTemplate{ title = template2, args = t }, after,
frame:expandTemplate{ title = template3, args = t }, after
▲ )
else
return mw.ustring.format( [==[
<table%s%s><caption>%s</caption>
<tr>%s<th style="width:50%%">%s</th><th style="width:50%%">%s</th></tr>
Line 39 ⟶ 55:
%s%s</td><td>
%s%s</td></tr></table>]==],
frame:expandTemplate{ title = template2, args = t }, after
)
▲ frame:expandTemplate{ title = template2, args = t },
end
end
|