Template:Howto test

From Tygron Support wiki
Revision as of 13:21, 1 November 2023 by Rudolf@tygron.nl (talk | contribs) (Created page with "{{#if:{{{file|}}}{{{video|}}}|<div class="editor_steps_box_wrapper">}}<div class="editor_steps_box"><p><span class="editor_steps_title">'''{{{preamble|How to}}}{{#if:{{{title|}}}| {{{title}}}}}:'''</span></p>{{#if:{{{1|}}}|{{{form|:#}}} {{{1}}}}}{{#if:{{{2|}}}|{{{form|:#}}} {{{2}}}}}{{#if:{{{3|}}}|{{{form|:#}}} {{{3}}}}}{{#if:{{{4|}}}|{{{form|:#}}} {{{4}}}}}{{#if:{{{5|}}}|{{{form|:#}}} {{{5}}}}}{{#if:{{{6|}}}|{{{form|:#}}} {{{6}}}}}{{#if:{{{7|}}}|{{{form|:#}}} {{{7}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to:

If more are needed, append:
{{#if:{{{8|}}}|:# {{{8}}}}}

The template can be generated using javascript by executing the following function in javascript:

var steps=20;
var string="{{#if:{{{file|}}}{{{video|}}}|<div class=\"editor_steps_box_wrapper\">}}<div class=\"editor_steps_box\"><p><span class=\"editor_steps_title\">'''{{{preamble|How to}}}{{#if:{{{title|}}}| {{{title}}}}}:'''</span></p>";
for(i=1;i<=steps;i++) {;
 string+="{{#if:{{{"+i+"|}}}|{{{form|:#}}} {{{"+i+"}}}}}";
}
string=string+"\n</div>{{#if:{{{file|}}}{{{video|}}}|<div class=\"editor_steps_image\">{{{file}}}{{{video|}}}</div></div>}}";