Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

What am I missing??

  • #5451
    Avatar photo[anonymous]

    Here is the code I have

    {{#setVar "arrayCount" this.items.length}}

    intended to set a variable using the helper

    setVar: function(nName, vValue, options) {
        if (!options.data.root) {
            options.data.root = {};
        }
            options.data.root[nName] = vValue;
        }

    and then comparing this value

    {{#checkIf {{math {{@root.arrayCount}} '-' 1}} '==' @index}}

    I get the error

    Rendering process failed
    An error occurred during rendering process:

    Unexpected token ‘;’

    I have been round and round on this – what am I doing wrong?

    Cheers!!

    #5499
    Avatar photo[anonymous]

    Hi,

    I do not see error in your code – maybe the issue is caused by different fragment?