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 showing parent category

June 14, 2010 11:21am

Subscribe [1]
  • #1 / Jun 14, 2010 11:21am

    carvingCode

    380 posts

    EE v2.0.2pb01 Build 20100430

    {exp:channel:categories channel="documents" show="3" dynamic="off" style="nested" disable="trackbacks|member_data"}

    This only shows the name of the parent category.  Adding “parent_only=‘no’” does not change behavior.

  • #2 / Jun 15, 2010 5:26pm

    Robin Sowell

    13255 posts

    Let’s narrow things down a bit, you’ve got some non-standard parameters in there.  For testing- go with:

    {exp:channel:categories channel="documents" show="3"}

    Now- this will only show category id 3- if it’s nested and cat id 3 is a child?  Add in the id(s) of its parents as well.  Doing that- I get the expected results.  If you don’t- is it possible to either link or paste to the results you get using the following:

    {exp:channel:categories channel="documents" show="3"} 
    {category_id} - {category_name}
    {/exp:channel:categories}
  • #3 / Jun 16, 2010 10:22am

    carvingCode

    380 posts

    Robin -

    In my example, category ‘3’ is a parent.  It has 8 child categories.  Using your suggestion, the following is generated:

    3 - Personnel Policies

    Do I have to explicitly include cat IDs for the child categories?  I thought this was the purpose of ‘parent_only=“no”’.

    In a test, I included several child categories in the list.  By default, the parent and child cats displayed.  When I set ‘parent_only=“yes”’, only the parent cat displayed.

    Unless I am missing something, it seems that this is not working the way it’s intended.

  • #4 / Jun 16, 2010 10:44am

    Robin Sowell

    13255 posts

    Do I have to explicitly include cat IDs for the child categories?

    Right- the show parameter is pretty specific- it exactly specifies the ids/cats to include- if a category isn’t included in the show?  It’s not going to be included.  (Other parameters may ‘cull’ from this list, but the list encompasses all cats that might be included.)

    I believe there are a few third party plugins that do more what you have in mind, but I don’t believe they’ve been converted yet.

  • #5 / Jun 16, 2010 10:59am

    carvingCode

    380 posts

    OK.  Thanks for clearing this up for me, Robin.

  • #6 / Jun 16, 2010 11:06am

    Robin Sowell

    13255 posts

    No problem.  (And I wrote one of the 1.x plugins that work more inline with what you were thinking- I’ll get a 2.x version out as soon as some time frees up!)

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

ExpressionEngine News!

#eecms, #events, #releases