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.

How to create sub-categories?

December 19, 2011 4:03pm

Subscribe [3]
  • #1 / Dec 19, 2011 4:03pm

    LMO

    203 posts

    Hello All,

    I wanted to know if there was a way to list only the sub-categories of the current category that is being viewed. I’ve taken a look at the docs and there does not seem to be a solution listed there. I’ve also already searched devot-ee and have found this addon: http://devot-ee.com/add-ons/child-categories (this does a lot more then what I am looking for). However, I feel that I might be missing something as this sounds like a feature that should be native considering that we can list parent categories. Thanks in advance.

  • #2 / Dec 19, 2011 5:13pm

    ahmad saad

    364 posts

    u can use query modules

  • #3 / Dec 20, 2011 11:24am

    artminister

    159 posts

    You can use the following code to list sub category. (enable query module before trying)

    {exp:query sql="SELECT cat_id, cat_name, cat_url_title FROM exp_categories WHERE parent_id =9"}
    {cat_id}, {cat_name}, {cat_url_title}
    {/exp:query}
  • #4 / Dec 20, 2011 11:30am

    LMO

    203 posts

    Thanks artminister. I’ll give that a go.

  • #5 / Dec 20, 2011 2:30pm

    Dan Decker

    7338 posts

    Hi VIM Interactive,

    Let us know if you need anything else with regards to this. Please feel free to make a Feature Request regarding the display of only category children, you didn’t miss anything in the User Guide.

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases