Hi,
I am trying to implement next/previous links for a link group slot.
Is there a simple way of doing this using velocity? The link group works fine and I can figure out the prev/next numeric value (if I am on link 2, prev = 1, next = 3 etc) but I cannot get the information I need to link to the previous/next items in the slot.
[COLOR=“DarkGreen”]#initslot(“orgLinkGroup” “”)
#set($counter = 0)
#if($sys.currentslot.relresults.size() > 0)
#foreach($relresult in $sys.currentslot.relresults)
#set($counter = $counter + 1)
#set($slottotal = $sys.currentslot.relresults.size())
#set($currentitem = $tools.math.toInteger($imageorder))
#set($prev = ($currentitem - 1))
#set($next = ($currentitem + 1))
#if($currentitem == $counter)
#set($prevlink = ??)
#set($nextlink = ??)
test
#end
#end
##!$counter!
##)$currentitem(
– $prevlink – || ++ $nextlink +
#else
#end
#endslot("")[/COLOR]
Thanks