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.

Show only entries from parent category, not sub category

March 29, 2011 6:01am

Subscribe [2]
  • #1 / Mar 29, 2011 6:01am

    R Gruyters

    14 posts

    The last two days I’ve been fiddling around how to display entries only from parent category.

    I have created a called section which has the following structure:
    Home
    About Us
    - Person A
    - Person B
    Projects
    - Project A
    - Project B
    - Project C
    Contact

    When publishing an entry (e.g.) for Person A section, which is a sub category, it automatically select the parent category (About Us) as well.

    When I go to the “About Us” page, it automatically display entries which are in “Person A” category.
    I don’t want to see entries from “Person A” when I’m displaying “About Us” page.

    How can I control to show only entries which are in a parent category, but not in a sub category of the parent category.

    Regards,

    Robin

  • #2 / Mar 29, 2011 8:16am

    Cheif

    626 posts

    The default behavior of EE and nested Categories states that any child category selected will also mark the entry as belonging to the parent… hence ur result.

    try turning off “Auto-Assign Category Parents”

    If this option is set to “yes”, when new entries that contain category assignments are submitted, the “parent” category of any sub-categories will be automatically assigned. If set to “no”, the entry will only be assigned to the child category.

  • #3 / Mar 29, 2011 8:48am

    R Gruyters

    14 posts

    Thanks for your answer. Works like a charm.

  • #4 / Mar 29, 2011 5:43pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Cheif.

    R Gruyters, Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases