Counting iterations

I have a number of loops where I am traversing the database, and I would like to know what iteration or pass I am on. There must be a built-in iteration counter somewhere, right? So in the following example, I would like to paginate every 4th item, but I cannot see how to access the counter?


    <w:kb:item:each type="Blog" category="Featured" by="rating">

       <!-- insert pagination code here -->

      <h4><href="<w:path url='news-article' />"><w:name /></a></h4>






Have more questions? Submit a request


  • 0
    Michael Slater

    Jim, for this you should use our built-in pagination features:

    I'll also check to see if there is a count available in WebvantaScript.

  • 0
    Michael Slater

    Turns out we don't expose the count consistently in WebvantaScript. We've added it to the to-do list. Let me know if you need it for what you are trying to do, or if the built-in pagination will suffice.

Please sign in to leave a comment.
Powered by Zendesk