Difference between revisions of "Template:SetProp/doc"

From Salem Wiki
Jump to: navigation, search
m (→‎Supported propname's: added new propnames)
m (updated)
Line 2: Line 2:
 
:This is a wrapper-template that calls {{t|SetProp/single}} to automatically set property values.
 
:This is a wrapper-template that calls {{t|SetProp/single}} to automatically set property values.
 
:It has a ''fixed-set'' of properties it supports, and can be expanded when needed in code...
 
:It has a ''fixed-set'' of properties it supports, and can be expanded when needed in code...
 +
:Some properties are fit to assign multiple values to, using a '''sep''', but those of type [[Special:Types/Boolean|Boolean]] are obviously not...
 +
:Supported properties of type [[Special:Types/Boolean|Boolean]] will <u>always automatically be set to "false" as default when not explicitly set</u>.
  
 
==Syntax==
 
==Syntax==
Line 15: Line 17:
 
:*:It defaults to a comma '''',''''
 
:*:It defaults to a comma '''',''''
 
===Supported propname's===
 
===Supported propname's===
Some properties are fit to assign multiple values to using a '''sep''', but those of type [[Special:Types/Boolean|Boolean]] are obviously not...
 
 
:It currently supports these properties:
 
:It currently supports these properties:
 
:*[[Property:IsGameMenu|IsGameMenu]] ('''Boolean''')
 
:*[[Property:IsGameMenu|IsGameMenu]] ('''Boolean''')

Revision as of 14:05, 28 June 2012

Description

This is a wrapper-template that calls {{SetProp/single}} to automatically set property values.
It has a fixed-set of properties it supports, and can be expanded when needed in code...
Some properties are fit to assign multiple values to, using a sep, but those of type Boolean are obviously not...
Supported properties of type Boolean will always automatically be set to "false" as default when not explicitly set.

Syntax

Type the below code somewhere on a page:
{{SetProp
|propname=propvalues
|propname=propvalues
|...
}}
It supports this optional named-parameter:
  • sep
    The default separator used in the propvalues to separate single-values from each other.
    It defaults to a comma ','

Supported propname's

It currently supports these properties:

Examples

See the example(s) in the documentation of {{SetProp/single}}, this template just passes known properties with their values to it.