We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Parent category list based on subcategory ID?

Development and Programming

Tony Gravett's avatar
Tony Gravett
34 posts
16 years ago
Tony Gravett's avatar Tony Gravett

Yikes, that’s a scary title … but here’s my problem:

I need to build a category list (and links) based on entries that are classified under a category in a different category list , e.g.,

Topics

Topic 1 Topic 2 Topic 3

Age Range

Infant Child Teenager Adult

Based upon all entries that have been classified as Teenager, I need to build a list of Topics, excluding any where no entries are available.

As I write this, it seems simple, but I have tried various approaches with no success. The closest I got was by using the Child Categories plugin, but I could never get the “siblings” parameter to work (which seemed to offer a solution). Here is as far as got (with no solution):

{exp:child_categories category_group="2" show_empty="no"}
                {child_category_start}
                    <li><a href="http://{path=search/results_category/C{child_category_id}}">{child_category_name}</a></li>
                {child_category_end}
            {/exp:child_categories}

Many thanks for any pointers!

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
16 years ago
John Henry Donovan's avatar John Henry Donovan

Tony,

the Child Categories plugin is a third party plugin so you will need to contact the plug in’s author or post in the Plugin forums. I can move it you want me to?

Also if you haven’t already, have you had a look at the Category Archive Tag?

EE Docs : Weblog Category Archive Tag

       
Tony Gravett's avatar
Tony Gravett
34 posts
16 years ago
Tony Gravett's avatar Tony Gravett

Thanks, John … I think moving my post to the Child Categories plugin thread is a good idea.

Thanks also for the pointer to the Weblog Category Archive tag. My issue is that I need to display a list of “topic” categories based on entries for which another category (in another category group) has been set … and I’m not seeing that this tag accommodates that.

I’m now starting to think that I should do this filtering with a status parameter instead, but it will be messier, since I can only assign one status group to a weblog (right?) Thanks again for replying and admin-ing this!

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Moving as per request.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.