Modul:HTML/Work: Unterschied zwischen den Versionen
Aus FürthWiki
Keine Bearbeitungszusammenfassung |
(+ <tbody>) |
||
| Zeile 5: | Zeile 5: | ||
-- mw.logObject(frame.args, "frame.args") | -- mw.logObject(frame.args, "frame.args") | ||
local t = | local t = | ||
"<table class=\"wikitable sortable\" border=\"1\">\n" .. | "<table class=\"wikitable sortable\" border=\"1\">\n" .. | ||
" <tr>\n" | " <tbody>\n" .. | ||
" <tr>\n" | |||
for _, a in ipairs(frame.args) do | for _, a in ipairs(frame.args) do | ||
t = t .. " | t = t .. " <th>" .. a .. "</th>\n" | ||
end | end | ||
t = t .. " | t = t .. " </tr>\n" | ||
-- mw.logObject(t, "t") | -- mw.logObject(t, "t") | ||
return t | return t | ||
| Zeile 17: | Zeile 18: | ||
function p.TableFooter(frame) | function p.TableFooter(frame) | ||
-- mw.log("TableFooter(frame)") | -- mw.log("TableFooter(frame)") | ||
local t = "</table>\n" | local t = | ||
" <tbody>\n" .. | |||
"</table>\n" | |||
-- mw.logObject(t, "t") | -- mw.logObject(t, "t") | ||
return t | return t | ||
Version vom 12. Januar 2026, 11:03 Uhr
Die Dokumentation für dieses Modul kann unter Modul:HTML/Work/Doku erstellt werden
local p = {}
function p.TableHeader(frame)
-- mw.log("tableHeader(frame)")
-- mw.logObject(frame.args, "frame.args")
local t =
"<table class=\"wikitable sortable\" border=\"1\">\n" ..
" <tbody>\n" ..
" <tr>\n"
for _, a in ipairs(frame.args) do
t = t .. " <th>" .. a .. "</th>\n"
end
t = t .. " </tr>\n"
-- mw.logObject(t, "t")
return t
end
function p.TableFooter(frame)
-- mw.log("TableFooter(frame)")
local t =
" <tbody>\n" ..
"</table>\n"
-- mw.logObject(t, "t")
return t
end
return p