2

I need to show a list of child categories plus it's entries. I had done this great using a child categories extension but now I need the ability to use Low Reorder. I have tried numerous ways get them to work together with no luck so I think I need another method. I haven't posted my current code because I'm sure it will need completely re-writing. Happy to post if needed but this is the structure I'm hoping for.

<dl class="cat-list">

<!-- child category loop -->

<dt><span>{child_category_name}</span></dt>
<dd>
    <p>{child_category_description}</p>
<ul>

  <!-- entries loop -->

  <li><a href="/articles/detail/{url_title}">{title}</a></li>

  <!-- /entries loop -->

</ul>
</dd>

<!-- /child category loop -->

</dl>

Any help would be greatly appreciated.

1

Your example code looks a lot like the example I used in this article. It doesn't necessarily take child categories only into account, but the principle is the same.

You could use the same solution I mention in the blog post, but use the Query tag (or a 3rd party add-on) to only get child categories and use Low Reorder to get the entries in the right order. However, you'd need a certain setup: one big Low Reorder set containing all entries from all categories, ordered the way you want. Then you could filter that list by category. That implies that an entry could only belong to 1 category.

If entries belong to multiple categories, the nested approach might be the only way. Just keep a close eye on the number of queries generated. As for the LR setup, a single set with 'show entries per single category' option will allow you to create ordered lists per category. Nesting that inside the Query tag (or 3rd party add-on) will let you use a {category_id} as a parameter to get to the right list.

So sorry, no easy answer for this one. It's always been a bit of a pain to generate entries per category in one go.

1
  • Thanks for the response Low, really helpful to hear from the dev of the plugin. I'll have to have a good look into your solution as I've not used the query tag before and I don't know php. Might just be easier to tell the client to use the date tab! Cheers
    – MikeeBee
    Jul 9 '13 at 12:10

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.