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.

Child category woes

July 28, 2009 12:54pm

Subscribe [2]
  • #1 / Jul 28, 2009 12:54pm

    ITCC

    32 posts

    I’m using a category group as a menu. Each category links to a template by using the {path=""} variable. The template then shows the appropriate entries according to category.

    My problem occurs with the categories that have “children”. Say one of my menu items is “About Us” and it has two child categories, “About Us 1” and “About Us 2”. When a user clicks on the link, “About Us”, the template displays not only the entries for the category “About Us”, but also “About Us 1” and “About Us 2”.

    I would like for the template in question to show entries for strictly the category selected. What I’ve found is that this becomes rather ambiguous because of EE’s practice of assigning “child” categories a category_id twice (one id for parent cat, one id for child).

    I’ve been working with some frankly monstrous queries to try to cross check entry_id’s, parent_id’s etc., and can’t help but feel that there must be an easier way to do something as simple as this.

    Any wisdom or advice would be much appreciated.

  • #2 / Jul 28, 2009 1:07pm

    ITCC

    32 posts

    Well, I was right about there being an easier way…

    Weblog Administration >  Global Weblog Preferences >  Auto-Assign Category Parents = “No”

    Problem solved…Sorry everyone!

  • #3 / Jun 20, 2010 11:13am

    rokker

    179 posts

    i’m still looking for an answer to this question. i use children categories in other templates. for a particular template, i’d like to only list the parent category’s entries, but not the child category’s entries. so global change won’t work for me.

    problem not solved yet… 😉

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

ExpressionEngine News!

#eecms, #events, #releases