Template:Howto: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
m (Rudolf@tygron.nl moved page Template:Editor steps to Template:Howto)
No edit summary
Line 1: Line 1:
{{#if:{{{file|}}}|<div class="editor_steps_box_wrapper">}}<div class="editor_steps_box"><p><span class="editor_steps_title">'''{{{preamble|How to}}}{{#if:{{{title|}}}|&nbsp;{{{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}}}}}{{#if:{{{8|}}}|{{{form|:#}}} {{{8}}}}}{{#if:{{{9|}}}|{{{form|:#}}} {{{9}}}}}{{#if:{{{10|}}}|{{{form|:#}}} {{{10}}}}}{{#if:{{{11|}}}|{{{form|:#}}} {{{11}}}}}{{#if:{{{12|}}}|{{{form|:#}}} {{{12}}}}}{{#if:{{{13|}}}|{{{form|:#}}} {{{13}}}}}{{#if:{{{14|}}}|{{{form|:#}}} {{{14}}}}}{{#if:{{{15|}}}|{{{form|:#}}} {{{15}}}}}{{#if:{{{16|}}}|{{{form|:#}}} {{{16}}}}}{{#if:{{{17|}}}|{{{form|:#}}} {{{17}}}}}{{#if:{{{18|}}}|{{{form|:#}}} {{{18}}}}}{{#if:{{{19|}}}|{{{form|:#}}} {{{19}}}}}{{#if:{{{20|}}}|{{{form|:#}}} {{{20}}}}}
{{#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|}}}|&nbsp;{{{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}}}}}{{#if:{{{8|}}}|{{{form|:#}}} {{{8}}}}}{{#if:{{{9|}}}|{{{form|:#}}} {{{9}}}}}{{#if:{{{10|}}}|{{{form|:#}}} {{{10}}}}}{{#if:{{{11|}}}|{{{form|:#}}} {{{11}}}}}{{#if:{{{12|}}}|{{{form|:#}}} {{{12}}}}}{{#if:{{{13|}}}|{{{form|:#}}} {{{13}}}}}{{#if:{{{14|}}}|{{{form|:#}}} {{{14}}}}}{{#if:{{{15|}}}|{{{form|:#}}} {{{15}}}}}{{#if:{{{16|}}}|{{{form|:#}}} {{{16}}}}}{{#if:{{{17|}}}|{{{form|:#}}} {{{17}}}}}{{#if:{{{18|}}}|{{{form|:#}}} {{{18}}}}}{{#if:{{{19|}}}|{{{form|:#}}} {{{19}}}}}{{#if:{{{20|}}}|{{{form|:#}}} {{{20}}}}}
</div>{{#if:{{{file|}}}|<div class="editor_steps_image">{{{file}}}</div></div>}}<noinclude>
</div>{{#if:{{{file|}}}{{{video|}}}|<div class="editor_steps_image">{{{file}}}{{{video|}}}</div></div>}}<noinclude>
If more are needed, append:<br>
If more are needed, append:<br>
<nowiki>{{#if:{{{8|}}}|:# {{{8}}}}}</nowiki>
<nowiki>{{#if:{{{8|}}}|:# {{{8}}}}}</nowiki>
Line 8: Line 8:
<pre>
<pre>
var steps=20;
var steps=20;
var string="{{#if:{{{file|}}}|<div class=\"editor_steps_box_wrapper\">}}<div class=\"editor_steps_box\"><p><span class=\"editor_steps_title\">'''{{{preamble|How to}}}{{#if:{{{title|}}}|&nbsp;{{{title}}}}}:'''</span></p>";
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|}}}|&nbsp;{{{title}}}}}:'''</span></p>";
for(i=1;i<=steps;i++) {;
for(i=1;i<=steps;i++) {;
  string+="{{#if:{{{"+i+"|}}}|{{{form|:#}}} {{{"+i+"}}}}}";
  string+="{{#if:{{{"+i+"|}}}|{{{form|:#}}} {{{"+i+"}}}}}";
}
}
string=string+"\n</div>{{#if:{{{file|}}}|<div class=\"editor_steps_image\">{{{file}}}</div></div>}}";
string=string+"\n</div>{{#if:{{{file|}}}{{{video|}}}|<div class=\"editor_steps_image\">{{{file}}}{{{video|}}}</div></div>}}";
</pre>
</pre>
</noinclude>
</noinclude>

Revision as of 13:04, 1 November 2023

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>}}";