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

Support archive

Return entries when no category in url?

leeaston 14 Dec 2013 21:15 question, complete

Hi Low,

I have a Low Reorder set with filter options set to 'Show entries per single category'.

In the template I have:
{exp:low_reorder:entries set="kitchen-items" dynamic="yes" limit="15" disable="category_fields|member_data"}

Initially the url of the template is www.site.com/kitchen, however no entries are returned.

When the url is www.site.com/kitchen/category/tables, entries in the category tables are returned.

Is there a way to have all the entries, regardless of category, returned when the url is www.site.com/kitchen

Many thanks
Lee

Replies

  1. Low 14 Dec 2013 21:57

    An entry can belong to multiple (sub)sets, and could therefore appear in the same stream twice, which isn't possible with EE. So, you'd either have to create another set to use (which doesn't use category filtering) when there's no category present in the URL, or use the native channel:entries tag in the same case.

    You could do that with the help of preload replace vars, for example:

    {if segment_2 == 'category'}{preload_replace:pre_set="kitchen-items"}{/if} 
    {if segment_2 != 'category'}{preload_replace:pre_set="kitchen-items-all"}{/if}
    {exp:low_reorder:entries set="{pre_set}" ... }

  2. leeaston 14 Dec 2013 22:20

    Thank you!