Sorting entries by Category
I'm a little unclear as to how to go about doing this and the documentation hasn't helped so far. Perhaps I'm missing something really obvious. I have a single channel for company bios that splits the entries across three categories. This is because some entries can be in more than one category (founder and on leadership team for instance). I set the filters to show future, the proper channel, both open and closed status, chose 'show entries per single category', and chose the correct category. The set in the CP properly sorts the entries I have and lets me order them, even the entries across multiple categories.
On my template I've tried pretty much everything with the most current being:
{exp:low_reorder:entries set="company_bios" dynamic="no" force_set_params="yes" category="{low_reorder_category_id}"}
How do you output the set and limit it to only the entries within the categories the entry belongs to? For instance, I only want the entries assigned to the Leadership Team category and sorted by the set and category they belong to.
Replies
Low 25 Oct 2013 08:28
When using the "show entries per single category" option, Low Reorder expects a valid set="" and category="" parameter. In your example, the set="" is fine, but the category="" is not. That should be a valid category ID, and a single category ID to boot.
You could either hard code it, or get it from the URI using (for example) Low Seg2cat. When the right category ID is given, then Low Reorder can fetch the associated entries and display them.
Stuart McCoy 25 Oct 2013 12:46
Thanks. I incorrectly assumed the {low_reorder_category_id} variable would do that for me. Works perfectly now.