Template:Counter: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 3: Line 3:
|down
|down
|↓={{#vardefine:counter|{{#sub:{{#var:counter}}|0|-1}}}}
|↓={{#vardefine:counter|{{#sub:{{#var:counter}}|0|-1}}}}
|#default={{#vardefine:counter|{{#var:counter}}<nowiki />*<nowiki />}}}}</includeonly><noinclude>
|#default={{#vardefine:counter|{{#var:counter}}*}}}}</includeonly><noinclude>
== Usage ==
== 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 .. ∞].
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 .. ∞].

Revision as of 16:46, 7 July 2022

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

<br>{{counter}}hallo

{{#var:counter}}

{{counter|-}}

{{#var:counter}}

delivers:

Hallo


Hallo


  • Hallo


    • Hallo


      • Hallo


        • Hallo


          • Hallo


        • Hallo