Difference between revisions of "Template:Demonstrate template"

From blackwiki
Jump to navigation Jump to search
imported>Rkitko
(ifeq doesn't seem necessary if not used on taxobox)
imported>Redrose64
(don't use code within pre - readability)
 
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
  <code><Nowiki>{{</nowiki>{{{1}}}{{#if:{{{2|}}}|<br>
+
  <Nowiki>{{</nowiki>{{{1}}}{{#if:{{{2|}}}|<br>
 
  &nbsp;{{!}}{{{2}}}}}{{#if:{{{3|}}}|<br>
 
  &nbsp;{{!}}{{{2}}}}}{{#if:{{{3|}}}|<br>
 
  &nbsp;{{!}}{{{3}}}}}{{#if:{{{4|}}}|<br>
 
  &nbsp;{{!}}{{{3}}}}}{{#if:{{{4|}}}|<br>
Line 10: Line 10:
 
  &nbsp;{{!}}{{{9}}}}}{{#if:{{{10|}}}|<br>
 
  &nbsp;{{!}}{{{9}}}}}{{#if:{{{10|}}}|<br>
 
  &nbsp;{{!}}{{{10}}}}}
 
  &nbsp;{{!}}{{{10}}}}}
  <nowiki>}}</nowiki></code>
+
  <nowiki>}}</nowiki>
 
Produces:
 
Produces:
  

Latest revision as of 15:30, 4 January 2018

Template documentation[view] [edit] [history] [purge]

Usage

Allows you to provide an example of a template without copying the code twice, making for far easier updating.

{{demonstrate template|Phylogeny|Clade 1|Clade 2|Clade 3|Clade 4|Clade 5}}

Produces:


{{Phylogeny
 |Clade 1
 |Clade 2
 |Clade 3
 |Clade 4
 |Clade 5 }}

Produces:

Template:Phylogeny


Note The template only supports 10 parameters at the moment, but it's a simple matter of copying and pasting to increase that. View the source and it should be self-evident.

See also

{{template doc}}