Hi -
We are trying to display the next and previous entry of the curent item on display.
We are trying to keep the template code as lean as possible and have:
{exp:channel:next_entry channel="{segment_1}" {if segment_3}category="{segment_3_category_id}"{/if}}
<em>Next entry: </em><a href="http://{path=%27{segment_1}{if">{title}</a>
{/exp:channel:next_entry}
{exp:channel:prev_entry channel="{segment_1}" {if segment_3}category="{segment_3_category_id}"{/if}}
<em>Previous entry: </em><a href="http://{path=%27{segment_1}{if">{title}</a>
{/exp:channel:prev_entry}Which displays the next and previous entry when viewed from the primary navigation; but when a detail page is viewed from within a category; we can’t seem to pick up the next and previous items within a category.
To check that our conditionals aren’t out of whack we have simplified the above to say
{exp:channel:next_entry category="2"}
<em>Next entry: </em>{title}
{/exp:channel:next_entry}
{exp:channel:prev_entry category="2"}
<em>Previous entry: </em>{title}
{/exp:channel:prev_entry}And still we aren’t able to see - when viewing a detail page under a category - the next or previous item within that cateogry.
What are we missing?
Many thanks -
James
Moved to CodeShare Corner by Moderator