Module:Infobox/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Common classes are listed (infobox-header, infobox-subheader, infobox-image)) |
No edit summary |
||
Line 27: | Line 27: | ||
===Map your arguments to parsing functions=== |
===Map your arguments to parsing functions=== |
||
{{Main|Module:Param Parse}} |
{{Main|Module:Param Parse}} |
||
Use the |
Use the params in [[Module:Param Parse]] to validate and format the data - feel free to create your own new params in [[Module:Param Parse]]. |
||
<syntaxhighlight lang="lua"> |
<syntaxhighlight lang="lua"> |
||
local params = { |
local params = { |
||
parse.name, |
|||
{name = 'name', func = parse.has_content, smw_property = 'Name'}, |
|||
parse.image, |
|||
{name = 'image', func = parse.image, smw_property = 'Image', smw_func = parse.image_smw, category_incomplete = 'Scenery missing Image'}, |
|||
{name = 'examine', func = parse.has_content}, |
{name = 'examine', func = parse.has_content, smw_property = 'Examine'}, -- Custom param |
||
parse.episode, |
|||
{name = 'episode', func = parse.episode, smw_property = 'Episode', smw_func = parse.episode_smw, category_incomplete = 'Scenery missing Episode'}, |
|||
... |
... |
||
} |
} |