Template:Counter

From railML 3 Wiki
Revision as of 16:40, 7 July 2022 by RailML Coord Documentation (talk | contribs) (Created page with "<includeonly>{{#switch:{{{1}}} |- |down |↓={{#vardefine:counter|{{#sub:{{#var:counter}}|0|-1}}}} |#default={{#vardefine:counter|{{#var:counter}}*}}}}</includeonly><noinclude...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

Either extends or shortens #var:counter. #var:counter will be used to express a tree hirarchy. It shall be a row of * (asterisks) of length [0 .. ∞].

Arguments

  • 1: lengthen by one if +,*,up,↑ (default); shorten by one if -,down,↓

example

{{#var:counter}}

{{counter|-}}

{{#var:counter}}

{{counter}}

{{#var:counter}}

{{counter}}

{{#var:counter}}

{{counter}}

{{#var:counter}}

{{counter}}

{{#var:counter}}

{{counter}}

{{#var:counter}}

{{counter|-}}

{{#var:counter}}

delivers: