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.

exp:channel:categories not displaying certain category_group

November 01, 2011 6:26am

Subscribe [3]
  • #1 / Nov 01, 2011 6:26am

    designbuddy

    6 posts

    Hi, Having a really odd problem trying to use the above.  I’ve set up a few category groups on my site and I’m using the following code to echo a list of category names into a UL.  Here’s the code:

    {exp:channel:categories category_group="4"}
    <li><a href="#">{category_name}</a></li>
    {/exp:channel:categories}

    What’s odd is when I use category_group=“3” it works great, and when I don’t specify a category group it loads group 3 in only.  I thought there was a problem with the group 4 I created, so I retraced my steps exactly as I’d created group 3, but it still wont load any other category_group than 3.

    The only other difference I can see between the two was I had content in the channel the group was associated with on 3 and not on 4, so I put some duff content in and tried to call it by channel instead, but still nothing.

    Can anyone see what I’m doing wrong or has anyone else had problems with this?

    Thanks & best regards,

    Phil

  • #2 / Nov 01, 2011 8:28am

    designbuddy

    6 posts

    I’ve found a kind of work around - not sure if I was mis-using the other approach?

    I did this instead and it worked great…

    {exp:channel:entries channel="portfolio"}
     {categories}
     <li><a href="#">{category_name}</a></li>
     {/categories}
    {/exp:channel:entries}
  • #3 / Nov 01, 2011 2:35pm

    Sue Crocker

    26054 posts

    Hi, designbuddy.

    Can you tell us which version/build of EE2.x you’re using? See EEWiki:// HowTo Determine My EE Version

    I don’t recall seeing this particular problem - is this particular category group assigned to more than one channel?

  • #4 / Nov 02, 2011 5:09am

    designbuddy

    6 posts

    Hi Sue, thanks for your reply.

    My version number is 2.3.1

    I only have the group assigned to one channel.  I’ve set that group up exactly the same as group 3, which works fine, but doesn’t help with the confusion!

  • #5 / Nov 04, 2011 5:46am

    John Henry Donovan

    12339 posts

    Hi designbuddy,

    What happens if you try the following?

    {exp:channel:categories category_group="4|3"}
    <li><a href="#">{category_name}</a></li>
    {/exp:channel:categories}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases