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

Support archive

Low reorder need to override set status for prev next tags

Malacai 25 May 2017 15:47 problem, complete

Hi,

In my set, i have both open and closed statuses marked, which is how I need it to be.
I also have under Categories selected "Show entries per single category".

In low reorder entries tag, I am overrideing status by setting the parameter status="not closed" and its working ok (showing only open entries)
this is my code:
{exp:low_reorder:entries set="myset" limit="1000" category="{segment_2_category_id}" status="open"}

However, on single entry page, where I have low reorder prev and next tags, it is showing both open and closed entries in them which is not ok.

this is my code:
{exp:channel:entries channel="mychannel" limit="1" status="not closed" orderby="date" sort="desc" disable="member_data" require_entry="yes"}
{embed="templategroup/entryprev" urltitle="{segment_3}" catid="{categories limit="1"}{category_id}{/categories}"}
{/exp:channel:entries}

this is my code in embed template:
{exp:low_reorder:prev_entry set="myset" url_title="{embed:urltitle}" category="{embed:catid}" status="open"}

{/exp:low_reorder:prev_entry}

I found this topic which suggested status parameter should work
https://getsatisfaction.com/low/topic...
So I tried setting the status parameter but it didn't help.

Am I doing something wrong or status isn't available as parameter in prev/next?
I know this isn't the best way to go but if you can provide solution that includes hacking the addon files, that would also be sufficient since this functionality is important for my client to have.

Thanks!

EDIT:
ee version: 2.10.1
low reorder version: 2.3.0
also using Low Reorder Titles

Replies

  1. Low 26 May 2017 07:38

    What are your EE and LR versions?
    Also, can you enable the template debugger and copy/paste all lines that mention Low Reorder here?

  2. Malacai 26 May 2017 08:45

    https://pastebin.com/faCAbk9b

    ee version: 2.10.1
    low reorder version: 2.3.0
    also using Low Reorder Titles

  3. Low 27 May 2017 08:48

    Actually, overriding the status in the prev/next tags is nog supported at the moment.

    You can add support for it by following these steps:

    1. Open up mod.low_reorder.php and look up line #278, which reads:

    $params = array('entry_id', 'url_title', 'prefix', 'no_results', 'loop');


    2. Change that line to this:

    $params = array('entry_id', 'url_title', 'status', 'prefix', 'no_results', 'loop');


    3. Then look up line #353, which reads:

    $params['entry_id']   = implode('|', $entries);


    4. Below that, add a new line and add this code, leaving the above intact:

    if ($status) 
    {
    $params['status'] = $status;
    }


    5. Save the file and try again.

    Of course, make sure you're backing up everything.

  4. Malacai 29 May 2017 06:22

    Yes, this is working now.
    Many thanks for the fix!