Module:SSC base/config
De Semantic MediaWiki - Sandbox
Holds a template configuration table, used in a class build upon Module:SSC base.
return {
-- **********************
-- * mandatory settings *
-- **********************
-- this is your type of entity
entityType = '',
-- this is the category, the entities of the class will be put in
category = '',
-- lists all available pairs "template parameter" -> "semantic property"
-- if you want to have a field in the template without storing it semantically, set it to true
parameters = {
argument = 'property name',
},
-- tell the class, which fields are mandatory
-- for every argument in this list not present on your page's template call,
-- an error will be displayed
mandatory = { 'field2', 'field2', },
-- these fields possibly contain more than one value
listFields = { 'field3' },
-- separator used in list fields
delimiter = ',',
-- *********************
-- * optional settings *
-- *********************
-- the headline of the entity's page
headline = 'This is a page about ...',
-- INFOBOX CONFIG HERE
-- here you can disable your infobox
omitInfoBox = false,
-- this is the name of the field, used as title in the infobox
titleField = 'fieldx',
-- this defines, which fields are put into your infobox and in which order
infoboxConfig = {
-- for every row in your infobox, add a table here, containing at least the entry "field" which
-- refers to the data field to display. if you omit the entry "label", the field will be displayed
-- over both columns
{ field = 'field1', label = 'Foo' },
{ field = 'field2', label = 'Bar' },
{ field = 'field3', label = 'Baz' },
-- why is this not defined as an array: lua does not maintain the order of items in an array but accesses them randomly
},
-- configure here, which fields should be linked (or form-linked)
linkFields = {
-- if a field is set to true, it will be linked
-- if it is set to a string, #formlink will be used
field1 = true,
field2 = 'FormName',
},
}