Alert extension example 3

From Bootstrap for MediaWiki
Component
Name Alert
Description Alert built in Lua that names the skin
Provider BootstrapComponents
Note Needs the Scribunto extension, which runs Lua modules on the wiki.
Reference BootstrapComponents Extension docs - Lua
Styling For all possible color styles and corresponding examples, see colors.

Alert naming the skin

Module

Module:Skin alert

-- Shows an alert that names the skin the page is rendered for
local p = {}

function p.show( frame )
	local skin = mw.bootstrap.getSkin()
	return mw.bootstrap.parse( 'alert', 'This page is rendered for the ' .. skin .. ' skin.', { color = 'info' } )
end

return p
Code
{{#invoke:Skin alert|show}}
Result