Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Go to End

17 Posts   1340 Views


16 April 2012 at 11:21pm Community Member, 27 Posts

Hey Guys,

I've been struggling with this situation for a few hours and have read everything I could find online.

What I'm doing is displaying Information from a DataObject to create a carousel (using jCarousel). The part I'm struggling with is displaying a bit of information from the next Item, the name, so basically it says next item is called 'item name'.

I looked on the web for a solution and found something called 'peekNext'. I tried to implement this in the template like so:

<% control Products %>


<% control peekNext %>$productName<% end_control %>

<% end_control %>

But I've had no luck.

Any Help?


17 April 2012 at 1:02am Forum Moderator, 1796 Posts

quick google leads me to believe..

<% if Iterator.peekNext %>

instead of

<% if peekNext %>

and I'd also advise nivo slider over jcarosel anyday of the week (including today)


17 April 2012 at 1:10am Community Member, 27 Posts

Hey swaiba,

I tried what you suggested but it failed on me and caused an error.

I swapped out the

<% control peekNext %>$productName<% end_control %>

for this

<% if Iterator.peekNext %>$productName<% end_if %>

but to no avail. Just got an error.


17 April 2012 at 1:14am Forum Moderator, 1796 Posts

yeah my bad - it should work as you have... what does it actually do?


17 April 2012 at 1:58am Community Member, 27 Posts

From what I understand it's supposed to allow you pull data from the next data object. At least that is the outcome I would like to achieve.


17 April 2012 at 2:08am Forum Moderator, 1796 Posts

yeah i get that bit, I searched the code and it is reight there is DataObjectSet - I meant what does the above template you are using actually do


17 April 2012 at 2:27am Community Member, 27 Posts

I'm the process of creating a module and widget set. It creates a dataobject tied to a page type; the data object being a motor home and the page type being a motor home category.

The peekNext part is part of the widget. It is supposed to display all the motor homes regardless of their category page, which it does. But also on each motor home entry i would like it to display the one that is going to appear next.

If you get what I'm trying to explain.


17 April 2012 at 2:32am Forum Moderator, 1796 Posts

I get what you are saying - I'm obviously not being clear enough myself.... what is the code when you execute outputing... is it blank? is it erroring? what is exactly is the result of the code?

Go to Top