17691 Posts in 4607 Topics by 2180 members
General Questions
SilverStripe Forums » General Questions » $Iterator doesn't work
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 955 Views |
-
$Iterator doesn't work

16 April 2009 at 9:28pm
Hi
I need to access the numerical index in a control loop. I was thrilled to find the following
"you can use $Iterator inside a control-block to access the numerical index of the current item".Unfortunately I get the following error when I try use $Iterator in a 'control children' structure:
Fatal error: Call to undefined method ViewableData_Iterator::forTemplate()Any ideas?
Thanks!
-
Re: $Iterator doesn't work

16 April 2009 at 9:41pm
The article that I found was incorrect - I see that the correct method is $pos. I'll respond to the article.
| 955 Views | ||
|
Page:
1
|
Go to Top |

