All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Category ID not respected with prev/next template tags

since1976 31 Jan 2011 21:34 problem, complete

This addon is working pretty sweet apart from one thing.

When I get to the latest entry (descending order), the next entry tag points to an entry that has been assigned to a category outside of the one defined in the settings and does not appear in the edit entries list at all.

This project (OSPX) is at the top in the module reorder entries list and has been assigned to category 3 – http://stage.incontrast.co.nz/project...

My assumption was that there shouldn't be a next project arrow showing as it is the first one in the list, is that a correct assumption?
But as you can see the next project arrow points to a project called academic dress hire. This project has not been assigned to category 3 and doesn't show up at all in the reorder entries list at all.

My entries tag is:

{exp:channel:entries channel="projects" category="3" status="open|Featured" orderby="cf_project_reorder" sort="desc" limit="1" url_title="{segment_2}" disable="category_fields|member_data|pagination|trackbacks"}


And nested inside that is:

 

<ul>
{exp:low_reorder:prev_entry field="cf_project_reorder" entry_id="{entry_id}" url_title="{segment_2}" prefix="prev_" loop="no"}
<li id="prev-prjt"><a href="{path='{segment_1}/{prev_url_title}'}" title="{title}">Previous</a></li>
{/exp:low_reorder:prev_entry}

{exp:low_reorder:next_entry field="cf_project_reorder" entry_id="{entry_id}" url_title="{segment_2}" prefix="next_" loop="no"}
<li id="next-prjt"><a href="{path='{segment_1}/{next_url_title}'}" title="{title}">Next</a></li>
{/exp:low_reorder:next_entry}

<li class="showAll"><a href="{path="projects/"}" class="showall">View all</a></li>
</ul>



These screenshots show the module's settings and reorder entries:



Any help would be appreciated

Replies

  1. since1976 31 Jan 2011 21:51

    Arrg screwed up the formatting of that second code block.

    {exp:low_reorder:prev_entry field="cf_project_reorder" entry_id="{entry_id}" url_title="{segment_2}" prefix="prev_" loop="no"}
    &lt;li id=&quot;prev-prjt&quot;&gt;&lt;a href=&quot;{path=&#x27;{segment_1}/{prev_url_title}&#x27;}&quot; title=&quot;{title}&quot;&gt;Previous&lt;/a&gt;&lt;/li&gt;
    {/exp:low_reorder:prev_entry}
    {exp:low_reorder:next_entry field="cf_project_reorder" entry_id="{entry_id}" url_title="{segment_2}" prefix="next_" loop="no"}
    &lt;li id=&quot;next-prjt&quot;&gt;&lt;a href=&quot;{path=&#x27;{segment_1}/{next_url_title}&#x27;}&quot; title=&quot;{title}&quot;&gt;Next&lt;/a&gt;&lt;/li&gt;
    {/exp:low_reorder:next_entry}
    &lt;li class=&quot;showAll&quot;&gt;&lt;a href=&quot;{path=&quot;projects/&quot;}&quot; class=&quot;showall&quot;&gt;View all&lt;/a&gt;&lt;/li&gt;

  2. Low 1 Feb 2011 08:06

    Thanks for the detailed description. I think it's a small bug. I'll get on it right away,

  3. Low 7 Feb 2011 11:24

    I just released version 1.1.1, which should take care of this issue.

  4. since1976 8 Feb 2011 03:57

    Awesome Low thanks very much.

    For anyone reading this who had the same problem, you have to put the category="" parameter on to prev/next tags in order for it to work properly.

    Thanks again Low

  5. Low 8 Feb 2011 07:53

    Cool. Glad it's working now.