For a given channel, is it possible to loop through the categories associated with its entries in alphabetical order, then nested-loop through the entries under that category? I'm trying to build a tree-view like template.

2 Answers 2


You can use the category_archive tag for this unless I've misunderstood your question: http://ellislab.com/expressionengine/user-guide/modules/channel/category_archive.html


Something like this with Stash should do the trick:

{exp:channel:entries channel="news"}
        {exp:stash:append_list name="item_{category_id}"}

{exp:channel:categories channel="news" style="linear"}
        {exp:stash:get_list name="item_{category_id}"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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