3214 Posts in 848 Topics by 810 members
| Go to End | Next > | |
| Author | Topic: | 775 Views |
-
peekNext

16 April 2012 at 11:21pm
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 %>
$productName
$productImage<% control peekNext %>$productName<% end_control %>
<% end_control %>
But I've had no luck.
Any Help?
-
Re: peekNext

17 April 2012 at 1:02am
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)
-
Re: peekNext

17 April 2012 at 1:10am
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.
-
Re: peekNext

17 April 2012 at 1:14am
yeah my bad - it should work as you have... what does it actually do?
-
Re: peekNext

17 April 2012 at 1:58am
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.
-
Re: peekNext

17 April 2012 at 2:08am
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
-
Re: peekNext

17 April 2012 at 2:27am
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.
-
Re: peekNext

17 April 2012 at 2:32am
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?
| 775 Views | ||
| Go to Top | Next > |


