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.

Subcategories won't display

November 24, 2010 10:05am

Subscribe [5]
  • #1 / Nov 24, 2010 10:05am

    Milan Topalov

    128 posts

    Categories 55-58 are children of category 54.

    {exp:channel:categories channel="news" category_group="8" style="linear" show="55|56|57|58" show_empty="yes"}
    {category_name}
    {/exp:channel:categories}

    The above doesn’t display anything.

    {exp:channel:categories channel="news" category_group="8" style="linear" show="54|55|56|57|58" show_empty="yes"}
    {category_name}
    {/exp:channel:categories}

    If I add 54 (parent) to the list, it displays fine - but I don’t want to display the parent, only the children.

    Would this be considered a bug - or am I doing something wrong?

  • #2 / Nov 24, 2010 11:46am

    Musa

    124 posts

    Faced similar problems, i think its a bug.

  • #3 / Nov 24, 2010 4:41pm

    Ingmar

    29245 posts

    What version and build are you using? Any extensions? Are all entries assigned to exactly one category?

  • #4 / Nov 25, 2010 1:05am

    Musa

    124 posts

    ExpressionEngine v2.1.0, Build:  20100810
    No Extension, i checked on a fresh installation too

  • #5 / Nov 25, 2010 3:56am

    John Henry Donovan

    12339 posts

    kodegeek,

    Can you share the template code you are using and describe what you are trying to do please?

    Also please update to EE2.1.1 so we are troubleshooting from the same page

  • #6 / Nov 25, 2010 4:09am

    Musa

    124 posts

    Hi John,
    here is the template code

    {exp:channel:categories channel="news" category_group="1" show="8|9" show_empty="yes"}
      {category_name}
    
     {/exp:channel:categories}

    This doesnt show the categories where 8,9 are subcategories of 2. But if i put show=“2|8|9”, it works.

  • #7 / Nov 25, 2010 8:07am

    Milan Topalov

    128 posts

    kodegeek,

    Can you share the template code you are using and describe what you are trying to do please?

    Also please update to EE2.1.1 so we are troubleshooting from the same page

    I’m using EEv2.1.1 (latest build).

    There is a way around the problem:

    {exp:channel:categories channel="news" category_group="1" show="8|9|10" show_empty="yes"}
    {if category_id != "8"}
    {category_name}
    {/if}
    {/exp:channel:categories}

    Where category 8 is parent of 9 and 10.

    In my case, children categories did contain entries (but that shouldn’t matter as we both used show_empty=“yes”).

    Still, it looks like a bug.

  • #8 / Nov 27, 2010 3:41pm

    Greg Salt

    3988 posts

    Hi Milan & Musa,

    Glad that you found a way ahead with this but it is not a bug. As per the documentation the parent category is required for any and all children categories.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases