8

Before I start adding multiple Channel Entries tags to a template, and getting my hands dirty with custom SQL, I wanted to see if this was possible. I'm using exp:channel:category_archive in the sidebar of a page and would love the output to respect the Low Reorder order on the list of entries it outputs.

Category Sorted Entries doesn't seem to support this yet http://rog.ee/category_sorted_entries and according to LR support this doesn't seem possible https://getsatisfaction.com/low/topics/category_archives_wont_reorder

Has anyone solved this?

2
  • 3
    It's a difficult issue to get right, especially if you're ordering entries "per single category" and you've got entries in multiple categories. If you're ordering entries as one big list, I'd probably go the PHP on Output route...
    – Low
    Dec 1 '12 at 10:16
  • Thanks for the reply! Luckily these entries will not be found in multiple categories but I do need the category headings. I'll go the custom query/php route. Dec 1 '12 at 21:04
3

It looks like you've answered your own question—and the answer is no, not without custom SQL / PHP.

According to EE documentation for the exp:channel:category_archive tag there is no attribute to sort the returned entries—you're only able to sort the categories. And, as you state in your question, official support for Low Reorder add-on (and now, Low's comment to your question) indicates that sorting is not possible without custom scripting. So unless you want to rephrase your question to ask for the custom SQL / PHP to accomplish your sorted category archive, the answer is, simply, "No."

That said, I believe that this would accomplish the same function, utilizing the {exp:channel:categories} tag:

{exp:channel:categories}
    <h1>Category: {category_name}</h1>
    <ul>
    {exp:channel:entries category='{category_id}' orderby='low_reorder_field'}
        <li>{title}</li>
    {/exp:channel:entries}
    </ul>
{/exp:channel:categories}

I would guess that this method would be much less efficient than utilizing the {exp:channel:category_archive} tag (and it runs contrary to your stated desire to avoid adding multiple channel entries tags), but technically it would accomplish what you're after.

And, at the risk of making this sound like every single other answer on this site, I suppose you could also get creative with Stash to accomplish this more efficiently without getting your hands dirty with custom SQL / PHP.

2
  • 2
    Note that ordering by low_reorder_field only applies to Low Reorder < 2. As per Low Reorder v2+, custom fields are no longer used to store the order of entries, and you'd need to use the exp:low_reorder:entries tag.
    – Low
    Dec 2 '12 at 10:01
  • Thanks Mark! I might try your approach but, as @Low mentions, use the LR v 2+ tags and see how that works. Dec 3 '12 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.