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.

Struggling with categories

February 15, 2011 8:54pm

Subscribe [5]
  • #1 / Feb 15, 2011 8:54pm

    mrchezem

    8 posts

    So after many hours of struggling I thought I would try this. Here’s what I’m trying to do:

    I have 5 categories and each parent category has 5 child categories. I’m showing the 5 categories on an initial page like this:

    {exp:channel:categories channel="projects" disable="pagination|member_data" parent_only="yes"}
                <a href="http://{path=projects/list}">{category_name}</a>
              </div>
              {/exp:channel:categories}

    I want to be able to click on the parent category and show the just the parent and it’s child categories on another page. From there you can click the child category and view the entries for just that child category. Any insight is appreciated.

  • #2 / Feb 16, 2011 9:28am

    Sue Crocker

    26054 posts

    Hi, mrchezem.

    What have you tried so far on the projects/list page? Can you tell us which version/build of EE2.x you’re using? See EEWiki:// HowTo Determine My EE Version

  • #3 / Feb 16, 2011 2:35pm

    mrchezem

    8 posts

    The build is: 20101220

    On the list page I have:

    {exp:channel:category_heading channel="projects"}
    <h1>{category_name} Projects</h1>
    {/exp:channel:category_heading}
              {exp:channel:entries channel="projects" disable="pagination|member_data" sort="asc" orderby="title"}<a href="http://{title_permalink=">{project_title}</a>
              {/exp:channel:entries}

    So this displays all the child entries from the parent category I choose, but really what I’m after is an interim step that displays the child categories. Then clicking a child displays all entries for that child.


    So the flow is something like this: Page displays Parent Categories > User Selects a Parent Category > Page displays Parent’s Child Categories > User Select’s a Child Category > Page displays Child Category’s Entries

  • #4 / Feb 17, 2011 2:59am

    John Henry Donovan

    12339 posts

    mrchezem,

    It would sense then to create another template for that in between category as your index is for the top level category. You will probably need to use a third party add-onto get the kind of listing you want though. Take a look at these. Any one that describes listing child categories might be suitable

  • #5 / May 05, 2011 10:02am

    Etheya

    213 posts

    Did you ever sort this… as im looking at same scenario at the moment… not sure which best way to do it…

  • #6 / May 05, 2011 2:19pm

    Brandon Jones

    5500 posts

    Hi Etheya,

    Did you browse the link John Henry mentioned? You’ll likely need an add-on to do exactly what you want here.

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

ExpressionEngine News!

#eecms, #events, #releases