Modul:Ereignis: Unterschied zwischen den Versionen
Aus FürthWiki
HeikoK (Diskussion | Beiträge) (Umstellung Slash anstelle Dot) |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
local p = {} --p stands for package | local p = {} --p stands for package | ||
function p.Faktenbox( frame ) | function p.Faktenbox(frame) | ||
local args = frame:getParent().args | |||
-- Before you ask: No, you cant' use extensionTag here! | -- Before you ask: No, you cant' use extensionTag here! | ||
tpl_bild = p. | local tpl_bild = p.bild(frame, args) | ||
tab_bild='' | local tab_bild='' | ||
if tpl_bild:gsub("%s+", "") ~= '' then | if tpl_bild:gsub("%s+", "") ~= '' then | ||
tab_bild='<tab name=Bild>' .. | tab_bild='<tab name=Bild>' .. | ||
| Zeile 14: | Zeile 13: | ||
-- The tab "Daten" is visible everytime | -- The tab "Daten" is visible everytime | ||
tpl_daten = p. | local tpl_daten = p.daten(frame, args) | ||
tab_daten='<tab name=Daten>' .. | local tab_daten='<tab name=Daten>' .. | ||
tpl_daten .. '</tab>' | tpl_daten .. '</tab>' | ||
t ='<div class=factbox><tabs>' .. | local t ='<div class=factbox><tabs>' .. | ||
tab_bild .. | tab_bild .. | ||
tab_daten .. | tab_daten .. | ||
| Zeile 27: | Zeile 26: | ||
end | end | ||
function p. | function p.bild(frame, args) | ||
return frame:expandTemplate{title = 'Bildertab', args={Bild=args.Bild}} | |||
end | end | ||
function p. | function p.daten(frame, args) | ||
return frame:expandTemplate{title = 'Ereignis/Daten', args=args} | |||
end | end | ||
return p | return p | ||
Version vom 24. August 2025, 12:39 Uhr
Seiten-Übersicht
| Hauptseite | Unterseiten | ||
|---|---|---|---|
| Allgemein | |||
| Faktenbox | Vorlagen | ||
| Formulare |
|
||
| Module | |||
| Abfrage | Vorlagen |
| |
| Formulare |
| ||
| Sonstige | |||
Siehe auch
local p = {} --p stands for package
function p.Faktenbox(frame)
local args = frame:getParent().args
-- Before you ask: No, you cant' use extensionTag here!
local tpl_bild = p.bild(frame, args)
local tab_bild=''
if tpl_bild:gsub("%s+", "") ~= '' then
tab_bild='<tab name=Bild>' ..
tpl_bild .. '</tab>'
end
-- The tab "Daten" is visible everytime
local tpl_daten = p.daten(frame, args)
local tab_daten='<tab name=Daten>' ..
tpl_daten .. '</tab>'
local t ='<div class=factbox><tabs>' ..
tab_bild ..
tab_daten ..
'</tabs></div>'
-- Use preprocess to render the factbox and all contens at once
return frame:preprocess(t)
end
function p.bild(frame, args)
return frame:expandTemplate{title = 'Bildertab', args={Bild=args.Bild}}
end
function p.daten(frame, args)
return frame:expandTemplate{title = 'Ereignis/Daten', args=args}
end
return p