Difference between revisions of "Template:!opt"

From Dungeons and Dragons Wiki
Jump to: navigation, search
(two <br ?>s needed for consistent styling.)
(= to remove a few colons showing up that shouldn't be.)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{2|}}}|<br /><br />'''{{{1}}}:''' {{{2}}}|}}</includeonly><noinclude>{{Documentation}}</noinclude>
+
<includeonly>{{#if: {{{2|}}} |&nbsp;
 +
 
 +
{{#switch:{{{3|}}}| = |1=:|2=::|3=:::|4=::::|:}}{{#switch: {{{1|}}}| = |italicize=''|'''{{{1}}}:'''&nbsp;}}{{{2}}}{{#ifeq: {{{1|}}}|italicize|''|}}}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 06:44, 9 January 2011

Template documentation (for the above template, sometimes hidden or invisible)
Parameters
Number Required How to use Example
1 No Display name, bold with a colon afterwards. If '' is used, it italicizes instead. Special
2 Yes Data, put a variable with a pipe in it. {{special|}}
3 No Indents a number of times equal to the number listed, up to a maximum of 4. If there a value is listed that doesn't make any sense or falls outside of the maximum, adds a single indent (to make it an optional sub-property) 3

This is for usage inside of templates, thus it begins with an exclamation mark instead of an alphabetical character.

Basically, Instead of writing
{{#if: {{{param|}}}|}}

Param:  {{{param}}}
you instead will write
{{!opt|Param|{{{param}}}}}

Visit Template:!opt/doc to edit this text! (How does this work?)