Modul:Util

Permanently protected module
IMT HilfeWiki - das Wiki
Documentation icon Module documentation

This module implements various general utility functions to be used via #invoke.

Usage[Quelltext bearbeiten]

{{#invoke:Util|getSkin}}
returns name of active skin, if Extension:BootstrapComponents is installed, "unknown" otherwise.

local p = {}

function p.globalFileExtension()
	-- return '.png'
	return '.svg'
end

function p.getSkin()
	-- dont shorten this to return mw and mw.bootstrap and mw.bootstrap.getSkin() or 'unknown'
	-- or dependant templates will show missing module bootstrap when BSC is not loaded
	if mw and mw.bootstrap then
		return mw.bootstrap.getSkin()
	else
		return 'unknown'
	end
end

return p
Cookies helfen uns bei der Bereitstellung des IMT HilfeWikis. Bei der Nutzung vom IMT HilfeWiki werden die in der Datenschutzerklärung beschriebenen Cookies gespeichert.