ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Can I select a subcategory without the parent category selected?

August 15, 2012 10:42pm

Subscribe [1]
  • #1 / Aug 15, 2012 10:42pm

    Danny T.

    426 posts

    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.

  • #2 / Aug 17, 2012 12:01pm

    Kevin Smith

    4784 posts

    Hi Danny,

    Great! Glad to see you’ve found the solution! Let us know if we can help again in the future!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases