Docly Developers
Function Updated 17 Oct 2026

Chpush(name)

Adds a new level to the counter by appending ".0": "2" becomes "2.0", and the next chstep gives "2.1".

The counter is a text value of numbers separated by dots, such as "2.1", and is written out with #name#. The function itself returns an empty string, so #chstep("c")# writes nothing. The function names are lower case: chinit, chstep, chdestep, chpush, chpop.

Parameters

namestringrequired

Name of variable to change.

Returns

Nothing, just adds a level to the counter.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
    chinit("c1");
    chstep("c1");
    chpush("c1");
    chstep("c1");
}#
<b>Counter value is:</b> #c1#