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

Support archive

Multiple categories in exp:low_reorder:entries tag

Tim Kelty 11 Sep 2012 13:38 question, complete

Quite often lately I've found myself in this situation:

I have a single channel, with a category group of categories.

Basically I want to end with one ordered list, but I need to be able to order them per category.

I'm using Low Reorder to reorder the entries using the "per single category" option, which works exactly how I want.

In the template, I want to get a full list of my entries across all my categories, with the ordering from Low Reorder.

The problem is, in the template, exp:low_reorder:entries needs a category param if I do it "per single category", and I can't specify multiple cats.

The ideal situation for me would be if the tag didn't have any category param, it would cycle through all categories and their entries (in order of your category group order preference) OR allowing for multiple categories in the param.

Is there another way to go about this? Am I thinking about it wrong?

Replies

  1. Low 11 Sep 2012 17:33

    Hi Tim,

    I see your point. And I guess, that if multiple categories were defined, the list would be ordered by category first, then custom order, right?

    The only way to do this now, would be just to have the big list and order that (so not the 'per single category' setting), with the downside that the list can become long.

    But, I'll keep your case in mind as a feature request and make note of it.

  2. Low 11 Sep 2012 17:36

    Just thought of a major hurdle in this case: with the 'per single category' option, an entry can belong to multiple categories. So, in theory, an entry should be listed multiple times in the 'big' list. This is not possible at the moment -- the channel:entries tag (and thus the low_reorder:entries tag) will always return distinct entries.

    Tim Kelty 11 Sep 2012 18:17

    Yep, I thought of the same problem, now that entries can be in multiple cats.

    Maybe a different approach would be to allow category filtering in the ordering view. So in this case I would have one big list, but be able to filter visible items by category.

  3. Chad Crowell 11 Oct 2012 22:56

    Hey Tim - what I did to get around this was to add the low reorder set id to the cat description field for each category and then do this:

    {exp:channel:categories
    style="linear"
    category_group="4"
    channel="Locations"
    }

    {category_name}

    {exp:low_reorder:entries set="{category_description}"}
    {title}

    {/exp:low_reorder:entries}

    {/exp:channel:categories}

  4. Tim Kelty 12 Oct 2012 13:35

    Good tip Chad, thanks.

  5. Alex 1 Feb 2013 20:39

    Going off of Chad's advice I was able to find a way to rig it so it can allow for single view category pages depending on the URL, which is what I needed (In this one the category ID and Low Reorder Set ID match).

    {exp:channel:category_heading relaxed_categories="yes" channel="your_channel"}
    {exp:low_reorder:entries set="{category_id}"}

    [Dynamic Content]

    {/exp:low_reorder:entries}
    {/exp:channel:category_heading}

    Thanks for your help, Chad.