Modul:Generic page

CamNet - das Wiki
Documentation icon Module documentation

This module implements template {{Generic page}}.

Usage

{{#invoke:Generic page|main}}

It also provides some additional "gateways" to some of Module:Generic page/class's static methods:

{{#invoke:Generic page|categorize}}
{{#invoke:Generic page|categoryPage}}
{{#invoke:Generic page|explainDataStore}}
{{#invoke:Generic page|gardeningCategoryPage}}
{{#invoke:Generic page|sfGenerateForm}}
{{#invoke:Generic page|sfGenerateFormEntry}}
{{#invoke:Generic page|sfGenerateFormLink}}
{{#invoke:Generic page|templateDocumentation}}

Maintenanace notes

This page was created by Module:Classgenerator and belongs to Class:Generic page.

local p = {}
local Class = require('Module:Generic page/class')
local getArgs = require('Module:Arguments').getArgs

function p.categorize(frame)
	return tostring(Class:categorize())
end

function p.categoryPage(frame)
	return tostring(Class:categoryPage())
end

function p.explainDataStore(frame)
	return tostring(Class:explainDataStore())
end

function p.gardeningCategoryPage(frame)
	return tostring(Class:gardeningCategoryPage())
end

function p.sfGenerateForm(frame)
	return tostring(Class:sfGenerateForm())
end

function p.sfGenerateFormEntry(frame)
	return tostring(Class:sfGenerateFormEntry())
end

function p.sfGenerateFormLink(frame)
	return tostring(Class:sfGenerateFormLink())
end

function p.templateDocumentation(frame)
	return tostring(Class:templateDocumentation())
end

function p.main(frame)
	local args = getArgs(frame)
	local me = Class:new(mw.title.getCurrentTitle().prefixedText)
	me:initFromArgs(args)
	me:storeData()
--	me:addInfobox() freetext comes before template, so no infobox...
	me:addPageBody()
 	return me:render()
end

return p