[ http://jira.magnolia.info/browse/MAGNOLIA-1505?page=comments#action_13951 ] Amir Mistric commented on MAGNOLIA-1505: ----------------------------------------
Also, varStatus.count is reporting wrong value. if contentNodeIterator was supposed to follow JSTL forEach tag specs then varStatus definatelly does not behave as in forEach. Here is what varStatus should provide: Table 2. Properties of the LoopTagStatus object Property Getter Description current getCurrent() The item (from the collection) for the current round of iteration index getIndex() The zero-based index for the current round of iteration count getCount() The one-based count for the current round of iteration first isFirst() Flag indicating whether the current round is the first pass through the iteration last isLast() Flag indicating whether the current round is the last pass through the iteration begin getBegin() The value of the begin attribute end getEnd() The value of the end attribute step getStep() The value of the step attribute Now, the million dollar question.....What does contentNodeIterator provides that JSTL's forEach couldn't ??? Yes, it is convenient because it sets the node for use in other tags (like <cms:includeTemplate />) but you should be able to set the node inside forEach and apply that node to other tags... > contentNodeIterator varStatus.index does not start from 0 > --------------------------------------------------------- > > Key: MAGNOLIA-1505 > URL: http://jira.magnolia.info/browse/MAGNOLIA-1505 > Project: Magnolia > Issue Type: Bug > Reporter: Amir Mistric > Assigned To: Boris Kraft > > varStatus.index in contentNodeIterator should start from 0 and not from 1. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.magnolia.info/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/developer.html ----------------------------------------------------------------
