17 April 2012 at 2:40am
Sorry mate, the result of the above code is nothing.
When I use
<% control peekNext %>$productName<% end_control %>
I get nothing, no errors, no text, etc.
When I use
<% if Iterator.peekNext %>$productName<% end_if %>
Fatal error: Call to undefined method ArrayIterator::hasValue() in C:\Users\DESKTOP1\AppData\Local\Temp\silverstripe-cacheC--xampp-htdocs-dev_DOM\.cache.module_motorhomes.templates.ProductWidget.ss on line 51
17 April 2012 at 3:41am
That hasn't wielded any results either. But to be honest, I'm entirely sure how to use the peekNext function, can you actually use it in the template, or do I have to use it in the controller/function?
30 April 2012 at 8:55pm
Firstly rather than saying "That hasn't wielded any results either" you might have indicated whether you could see the word "test" at all - that indicated whether you are going into the contorl structures. Second you could open a debugger and stick a breakpoint on the peekNext function to see what is happending. Third you could post a simple example that completely encapsulates/reproduces the problem because there is so *no* "other stuff" that could be affecting this from working - often the problem is not where you think it is.
And if you are after "Admins" then your only reliable hope is to get on IRC when the core devs are present which they are for one hour a week - or to post on the core dev list (but that is more for development decisions rather than support). I don't see silverstripe employees posting on here at all often.