ListIt2 1.4.1
CMSMS 1.12.1
I know this is an unsupported version so please bare with me.
I applied the code form the above post and it has been working perfectly for over a year, My client decided to add more items to the list and now it is not working correctly.
The issue only arrises when 6 or more items are available. 5 item works as expected.
The code below is what resides in the detail page
Code: Select all
{$current_id = $item->item_id}
{ListIt2CaseStudies summarytemplate=next_prev assign=dummy}
{foreach $items as $sumitem}
{if $sumitem->item_id == $current_id}
{$iteration=$sumitem@iteration}
{if $iteration > 1}
{$prev_link = $items[$iteration-1]->url}
{/if}
{if $iteration < $sumitem@total}
{$next_link = $items[$iteration+1]->url}
{/if}
{break}
{/if}
{/foreach}
{*Links*}
{if isset($prev_link)}<a class="btn btn-left" href="{$prev_link}">prev</a>{/if}
{if isset($next_link)}<a class="btn btn-right" href="{$next_link}">next</a>{/if}
any help would be very welcome
Thanks
Mark