User:Flashjay/templates/GCDissueTOCtest01: Difference between revisions

From GCD
Jump to navigation Jump to search
No edit summary
No edit summary
Line 30: Line 30:
<ol style="list-style: outside none none; margin: 0;">
<ol style="list-style: outside none none; margin: 0;">
   <li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|1}}}. {{#var:toctitle.1}}</li>
   <li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|1}}}. {{#var:toctitle.1}}</li>
{{ #if:{{#var:toctitle.2|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|2}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|2}}}. {{#var:toctitle.2}}<br />
{{#vardefine:tocnumber|{{#expr:{{#var:tocnumber}}+3}}}}
{{ #if:{{#var:toctitle.4|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#explode:{{#var:toctitle.4}}|.|0}}mod2 }} | 0 | white | #ddd }};">{{#var:toctitle.4}}<br />
Feature is</li> }}
Feature is</li> }}
   <li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|3}}}mod2 }} | 0 | yellow | {{#var:testcolour}} }};">{{{tocnumber|3}}}. {{#var:toctitle.3}}</li>
   <li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|3}}}mod2 }} | 0 | yellow | {{#var:testcolour}} }};">{{{tocnumber|3}}}. {{#var:toctitle.3}}</li>
Line 38: Line 39:
--></includeonly><!--
--></includeonly><!--
--><noinclude>
--><noinclude>
Result of explode (101&&&this. is a. title) = {{#explode:101&&&this. is a. title|&&&|0}}
Result of explode (101&&&this. is a. title) = {{#explode:101&&&this. is a. title|&&&|-1}}
Result of explode (101.this. is a. title) = {{#explode:101.this. is. a. .title|.|2}}




Line 44: Line 51:
}}</nowiki>
}}</nowiki>


{{#vardefine:toctitle.1|First title}}
{{#vardefine:toctitle.1|First title}}<!--
{{#vardefine:toctitle.2|Second title}}
-->{{#vardefine:toctitle.2|Second title}}<!--
{{#vardefine:toctitle.3|Third title}}
-->{{#vardefine:toctitle.3|Third title}}<!--
{{#vardefine:testcolour|red}}
-->{{#vardefine:toctitle.4|982. Fourth title with number added}}<!--
-->{{#vardefine:testcolour|red}}<!--
-->{{#vardefine:tocnumber|1}}
 
Result of explode (#explode:{{#var:toctitle.4}}|.|0) = {{#explode:{{#var:toctitle.4}}|.|0}}
 
 
 
{{User:Flashjay/templates/GCDissueTOCtest01}}
{{User:Flashjay/templates/GCDissueTOCtest01}}





Revision as of 19:38, 26 December 2019


Result of explode (101&&&this. is a. title) = 101

Result of explode (101&&&this. is a. title) = this. is a. title

Result of explode (101.this. is a. title) = is


{{User:Flashjay/templates/GCDissueTOCtest01 |testcolour=red }}


Result of explode (#explode:982. Fourth title with number added|.|0) = 982


Active test start

Table of Contents
  1. 1. About the author
  2. 2. Foreword to the first edition
    Feature is
  3. 3. Foreword to the second edition

Active test finish


Active test start 2

Table of Contents
  1. 1. First title
  2. 982. Fourth title with number added
    Feature is
  3. 3. Third title

Active test finish 2


Divide 0 by 2 = remainder 0 Even false

Divide 2 by 2 = remainder 0 Even false

Divide 3 by 2 = remainder 1 Odd true

{{#ifeq: {{#expr: expression }} | 0 | value if false | value if true }}

Zero is false, any number is true


  1. About the author
  2. Foreword to the first edition
    Feature is
  3. Foreword to the second edition


Table of Contents
  1. About the author
  2. Foreword to the first edition
    Feature is
  3. Foreword to the second edition



  1. 1. About the author
  2. 2. Foreword to the first edition
    Feature is
  3. 3. Foreword to the second edition


  1. About the author
  2. Foreword to the first edition
  3. Foreword to the second edition


{{User:Flashjay/templates/GCDissueTOCtest01 |testcolour=red }}


Active test start

Table of Contents
  1. 1. About the author
  2. 2. Foreword to the first edition
    Feature is
  3. 3. Foreword to the second edition

Active test finish


Active test start 2

Table of Contents
  1. 1. First title
  2. 982. Fourth title with number added
    Feature is
  3. 3. Third title

Active test finish 2


Table of Contents
Script: John Smith


Table of Contents
0. Title
Feature Name
Script: John Smith
Script: John Smith
Script: John Smith
Script: John Smith
Script: John Smith



Table of Contents
0. Title
Feature Name
Script: John Smith
Script: John Smith
Script: John Smith
Script: John Smith
Script: John Smith