Skybow Document Generator, datasource: for multiple items - Access to "count" and "index" of the loop
AnsweredI want to show the number of counts and the current index of the items within the generated document consisting of multiple items (e.g. column 1 - Nr: "1,2,3,4,5,..." and "Number of Items: x").
How do I get access to the .count and .index-information the document generator-task uses?
Best regards,
Christoph
-
Official comment
Hi Christoph Käferböck,
you can use javascript global window variables in your template like this:
[[{ window.dgcurrentindex=0; return ""; }]]
[[loop]]
[[{ window.dgcurrentindex++; return window.dgcurrentindex; }]] - [[Title]]
----------------------------------------------------------------------
[[end loop]]
Total: [[{return window.dgcurrentindex; }]]Kind regards
skybow Support
-
Hi together,
thanks for the idea, works fine.
Best regards,
Christoph
0
Please sign in to leave a comment.
Comments
2 comments