I’m trying to use Category Archives with Channel Entries to display a list of categories + subcategories with associated entries on a single page.
The display hierarchy will goes as follows:
- Parent Category
- Subcategory
- List of Entries
Somebody contributed this code on the Category Archives page in the User Guide:
{exp:channel:category_archive channel="menu_item" style="linear"}
{categories}
<h3>{category_name}</h3><p> <br />
{exp:channel:entries channel="menu_item" category="{category_id}"}<br />
<a href="http://{title_permalink=PATH}">{title}</a><br />
{/exp:channel:entries}<br />
{/categories}<br />
{/exp:channel:category_archive}The problem with this is that the entry is appearing under the parent category AND subcategory. I have a strange feeling I’m missing a simple configuration or setting somewhere. :(
EDIT: I found the setting under Global Preferences! Problem solved.