<input style='float:left' type="button" class="prev-btn" name="b1" value="prev" onclick="location.href='/item/view/{$item->id-1}'">
<input style='float:right' type="button" class="next-btn" name="b2" value="next" onclick="location.href='/item/view/{$item->id+1}'">
This works but If next number id missing it will give an error
How to rewrite this to go to next or previous only active id item...
href='/item/view/{$item->id+1}
Any simple suggestions????