Hey swaiba,
I've done this:
<% if peekNext %>hello world
<% control peekNext %>test $someotherfield $ID $Name<% end_control %>
<% end_if %>
and it doesn't enter the control structures as it doesn't display the word 'test'.
Here is the actual code i am using on my template:
<div class="MotorHomeWidget">
<div class="nav_holder"></div>
<ul id="MotorHomeWidget" class="jcarousel-skin-viewrange">
<% control ViewOurRange %><li class="$EvenOdd<% if First %> first<% end_if %><% if Last %> last<% end_if %>">
<div class="ViewRangeTitle"><a href="$Link">$Title</a></div>
<p>$Description.LimitCharacters(80)</p>
<a href="$Link">$Image.CroppedImage(200,150)</a>
<% if peekNext %>
test if statement
<% control peekNext %>test $Title $ID<% end_control %>
<% end_if %>
</li><% end_control %>
</ul>
</div>
The data the above template is pulling is from a dataobject if that helps.
Also i'm not entirely sure how to:
"open a debugger and stick a breakpoint on the peekNext function"
Some pointing in the right direction on that would also be helpful.
Thanks again.