Modul:Person: Unterschied zwischen den Versionen
Aus FürthWiki
(Experiment on multiline strings) |
K (Just typo) |
||
| Zeile 1: | Zeile 1: | ||
local p = {} --p stands for package | local p = {} --p stands for package | ||
function p.Factbox(frame) | function p.Factbox( frame ) | ||
pf = frame:getParent() | pf = frame:getParent() | ||
args = pf.args | args = pf.args | ||
Version vom 22. Januar 2024, 23:43 Uhr
Seiten-Übersicht
| Hauptseite | Unterseiten | ||
|---|---|---|---|
| Allgemein | |||
| Faktenbox | Vorlagen | ||
| Formulare |
|
||
| Module | |||
| Abfrage | Vorlagen |
| |
| Formulare |
| ||
| Sonstige | |||
Siehe auch
local p = {} --p stands for package
function p.Factbox( frame )
pf = frame:getParent()
args = pf.args
g = p.Bild( frame, args )
d = p.Daten( frame, args )
-- Before you ask: No, you cant' use extensionTag here!
t1='<tab name=Bild>' .. g .. '</tab>'
t2='<tab name=Daten>' .. d .. '</tab>'
t ='<div class=factbox><tabs>' ..
t1 ..
t2 ..
'</tabs></div>'
-- Use preprocess to render the factbox and all contens at once
return frame:preprocess(t)
end
function p.Bild( frame, args )
t = frame:expandTemplate{title = 'Bildertab', args={Bild=args.Bild}}
return t
end
function p.Daten( frame, args )
t = args.Bild
return tostring(t)
end
return p