Template:ReplaceBlankInput

From Slavemaker Wiki
Revision as of 01:45, 1 December 2011 by Afker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a helper template to set replace any outer template parameter with a default value if if it is specified to be blank.

Usage[edit]

{{ReplaceBlankInput|{{{ParameterToCheck|}}}|DefaultValueToReplace}}

where "ParameterToCheck" is the name of the parameter that, if left blank in the outer template, should display DefaultValueToReplace.

Explaination[edit]

Many editors copy-paste a template usage and only fill out fields that have values, while leaving the non-applicable fields specified as blank. This can cause confusing in the rendered output, as the default "None" of the parameter value is not used.

Example of problem this templates want to fix:


Training Requirement:
Special Statistics: Chakra Control
Special Actions: Chakra Training
Other Specials:
  • Randomly in the morning she would encounter different people

In the above example, it can appear to visitors still learning the game that the Chakra Control special statistics and the Chakra Training special action are the Training Requirements, whereas the morning encounters have something to do with Other Specials. This would happen if those two fields are left as blank in the original slaveinfo template. By plugging this template into the slaveinfo template, we will instead get:


Training Requirement: None
Special Statistics: Chakra Control
Special Actions: Chakra Training
Other Specials: None
  • Randomly in the morning she would encounter different people

which offers better clarity to inexperienced players.