Skins

How do I disable previous/next link on the oldest/newest item?

Scenario:
"I'm using the built in <%prevlink%> and <%nextlink%> variables in Nucleus to give my items pagination, but a "Previous Item" link displays when I'm on the oldest item and a "Next Item" link displays when I'm on the newest! I want the link to the previous item to display only when there is a previous item and the link to the next item to display only when there is a next item."

Solution:
Just use the <%if%> variable to check if there is a previous or a next item. Copy and paste this in your Item Page skin part (not template):

<%if(previtem)%><%prevlink([prev post],1)%><%endif%>
<%if(nextitem)%><%nextlink([next post],1)%><%endif%>

Original forum thread (thanks, admun!):
http://forum.nucleuscms.org/viewtopic.php?t=10655

section: Skins | submitted by Leng on 2006.Feb.04 | 2830 views

item rate
Total votes: 3 - Rating: 8.67

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10