Difference between revisions of "Template:!opt"

From Dungeons and Dragons Wiki
Jump to: navigation, search
(Allowing for fluff.)
m (Sometimes whitespace is ignored. Other times it isn't. This makes puppies cry at night.)
Line 1: Line 1:
 
<includeonly>{{#if: {{{2|}}} |&nbsp;
 
<includeonly>{{#if: {{{2|}}} |&nbsp;
  
{{#switch:{{{3|}}}|1=:|2=::|3=:::|4=::::|:}}{{#switch: {{{1|}}}|''=''|'''{{{1}}}:''' |}}{{{2}}}{{#ifeq: {{{1|}}}|''|''|}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
+
{{#switch:{{{3|}}}|1=:|2=::|3=:::|4=::::|:}}{{#switch: {{{1|}}}|''=''|'''{{{1}}}:'''&nbsp;|}}{{{2}}}{{#ifeq: {{{1|}}}|''|''|}}}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 00:01, 3 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?)