Modul:Klasse: Unterschied zwischen den Versionen

Aus FürthWiki
Zur Navigation springen Zur Suche springen
Zeile 13: Zeile 13:
 
  tab_daten ..  
 
  tab_daten ..  
 
  '</tabs></div>' ..
 
  '</tabs></div>' ..
  mw.title.getCurrentTitle()
+
  mw.title.getCurrentTitle().tostring()
  
 
-- Use preprocess to render the factbox and all contens at once
 
-- Use preprocess to render the factbox and all contens at once

Version vom 29. Januar 2024, 22:37 Uhr

local p = {} --p stands for package

function p.Faktenbox( frame )
	pf = frame:getParent()
	args = pf.args
	
	-- The tab "Daten" is visible everytime
	tpl_daten = p.Daten( frame, args )
	tab_daten='<tab name=Daten>' .. 
	tpl_daten .. '</tab>'
	
	t ='<div class=factbox><tabs>' .. 
	   tab_daten .. 
	   '</tabs></div>' ..
	   mw.title.getCurrentTitle().tostring()

	-- Use preprocess to render the factbox and all contens at once
	return frame:preprocess(t)
end

function p.Daten( frame, args )
	t = frame:expandTemplate{title = 'Klasse.Daten', args={
		KlassenName=args.KlassenName,
        KlassenBildHauptseite=args.KlassenBildHauptseite,
        KlassenBildKategorie=args.KlassenBildKategorie,
        KlassenKategorie=args.KlassenKategorie}
	}
    return t
end

return p