Sign in

What am I missing??

  • This topic has 1 reply, 2 voices, and was last updated 2 years, 5 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5451
    Avatar photopublii-slpa

    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 photoTomasz Dziuda

    Hi,

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

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.