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.

Categories show="not" inconsistent between implementations

October 26, 2011 4:34pm

Subscribe [5]
  • #1 / Oct 26, 2011 4:34pm

    PhireGuys

    525 posts

    I have two snippets of code:

    {categories show="not 1|2|3|4|5|6|7" show_group="1"}
     <li><a href="http://{path=mypage}">{category_name}</a></li>
    {/categories}

    and

    {exp:channel:categories channel="projects" show="not 1|2|3|4|5|6|7" category_group="1" style="linear"}
     <li><a href="http://{path=mypage}">{category_name}</a></li>
    {/exp:channel:categories}

    The first block of code is within the channel:entries tag.  The show=“not” restricts the categories that are shown to not include the ones I specify.  This still allows their children to show up.

    The second block of code, if I restrict those same categories, all their children also no longer show up.

    This is probably expected behavior but it feels strange and inconsistent. How can I restrict a particular category from showing up when listing all my categories while still allowing that category’s children to show up (as I get from the first code’s output)?

    The reason I’m not showing those particular categories is that they are for grouping and not for front-end users to be able to interact with.

    Thanks

  • #2 / Oct 27, 2011 10:40am

    Sue Crocker

    26054 posts

    Hi, Phire_SK.

    Quick question, have you considered using Auto-Assign Category Parents set to No? Would that work for you? I haven’t investigated the issue yet, just wanted to ask the question before hand.

  • #3 / Oct 27, 2011 10:47am

    PhireGuys

    525 posts

    For other areas of the site, we need the the auto-assign category parent since the parent is an important part, we just don’t really want the users to be able to see the parents when viewing a listing of all categories.  The parents are only used for the top level navigation while the children are used for “tagging”.

  • #4 / Oct 28, 2011 7:18pm

    Kevin Smith

    4784 posts

    You’re spot on, Phire. This is inconsistent behavior. I’ve filed a bug report on your behalf for this, so keep your eye on that for updates. I’ll be interested to see what the devs have to say in terms of the expected behavior here.

  • #5 / Mar 19, 2012 2:07pm

    AJP

    311 posts

    I’ve just encountered this bug as well. In EE 2.4.0.

    {exp:channel:categories} restricts the parents and children, while {categories} just restricts the parents.

  • #6 / Mar 20, 2012 8:07pm

    Sean C. Smith

    3818 posts

    AJ,

    Thanks for letting us know that you have also had this issue. I see that you commented on the bug report already, Is there anything else I can assist you with?

    Sean

  • #7 / Apr 25, 2012 9:58am

    AJP

    311 posts

    Hey Sean. Nope, there is nothing else, other than getting this bug fixed. 😊

    Would be nice to have an update on the bug report as well, since it’s 6 months old with no progress or status update.

  • #8 / Jun 26, 2012 1:40pm

    Adam Christianson

    115 posts

    I have just run into this bug too. Is there any kind of workaround for this issue?

  • #9 / Jun 29, 2012 4:18pm

    Dan Decker

    7338 posts

    Hi Adam,

    Since the bug is still listed as new. I’ll bring this up with the Devs and get clarification.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases