Modul:Klasse: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 4: | Zeile 4: | ||
pf = frame:getParent() | pf = frame:getParent() | ||
args = pf.args | args = pf.args | ||
+ | t = p.Daten( frame, args ) | ||
-- The tab "Daten" is visible everytime | -- The tab "Daten" is visible everytime | ||
− | tpl_daten = p.DatenOld( frame, args ) | + | --tpl_daten = p.DatenOld( frame, args ) |
− | tab_daten='<tab name=Daten>' .. | + | --tab_daten='<tab name=Daten>' .. |
− | tpl_daten .. '</tab>' | + | --tpl_daten .. '</tab>' |
− | t ='<div class=factbox><tabs>' .. | + | --t ='<div class=factbox><tabs>' .. |
− | + | -- tab_daten .. | |
− | + | -- '</tabs></div>' | |
-- Use preprocess to render the factbox and all contens at once | -- Use preprocess to render the factbox and all contens at once |
Version vom 21. Februar 2024, 19:39 Uhr
local p = {} --p stands for package
function p.Faktenbox( frame )
pf = frame:getParent()
args = pf.args
t = p.Daten( frame, args )
-- The tab "Daten" is visible everytime
--tpl_daten = p.DatenOld( frame, args )
--tab_daten='<tab name=Daten>' ..
--tpl_daten .. '</tab>'
--t ='<div class=factbox><tabs>' ..
-- tab_daten ..
-- '</tabs></div>'
-- Use preprocess to render the factbox and all contens at once
return frame:preprocess(t)
end
function p.Daten(frame, args)
t = '<table class="wikitable">'..
'<th colspan="4">'..mw.title.getCurrentTitle().text..'</th>'
t=t..'</table>'
return t
end
function p.DatenOld( frame, args )
t = frame:expandTemplate{title = 'Klasse.Daten', args={
KlassenName=mw.title.getCurrentTitle().text,
KlassenBildHauptseite=args.KlassenBildHauptseite,
KlassenBildKategorie=args.KlassenBildKategorie,
KlassenKategorie=args.KlassenKategorie}
}
return t
end
return p