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 can I get EE to only display child categories? (or get an experienced EE user to help me?)

July 25, 2008 5:01pm

Subscribe [4]
  • #1 / Jul 25, 2008 5:01pm

    los1sol

    41 posts

    If you’re reading this and can help me, throw me a bone…  Think of the karmic reward, the children…

    I’m trying to implement the following product hierchy:

    Products Index—>  Parent category page —>  Child category page —> Product Items

    I created 1 products weblog, 9 parent categories with 5 child categories each. I’m using 2 templates, one for the products index page that displays parent categories, and another for the category pages to show child categories and products list. I plan on using a 3rd for the product Item page, if I ever make it that far.

    My Products Index page, which I’m 99% sure is correct:

    {{exp:weblog:categories weblog="products" style="linear" show_empty="yes" show="10|11|12|13|14|15|16|17|45"}
                              <div class="category_box"> 
                                  <a href="#">{category_image}</a>
                                  <a href="http://{path=products/list}">{category_name}</a> 
                                  {category_description}
                              </div>
                        {/exp:weblog:categories}

    My products list code, which is clearly missing a key piece (the first part just passes down the correct heading image, but you have to go to the products index page to see what I mean):

    {exp:weblog:category_heading weblog="products"}
                              <h1>{category_section}</h1>          
                              <div id="products_index_wrapper">                  
                        {/exp:weblog:category_heading}
                  
                        {exp:weblog:categories weblog="products" show_empty="yes"}
                              <div class="category_box"> 
                                  <a href="#">{category_image}</a>
                                  <a href="#">{category_name}</a> 
                              </div>
                        {/exp:weblog:categories}

    The problem is I don’t know how to get it so only the child categories for that specific category are displayed. Right now, no matter what you click on, all the categories are showing up.

    Does anybody know what I’m doing wrong??

  • #2 / Jul 28, 2008 12:23am

    los1sol

    41 posts

    [que crickets chirping]

  • #3 / Jul 31, 2008 7:30pm

    jdgraffam

    11 posts

    Seriously, an answer would be nice. Because I sense that this is a feature that is missing from EE. Why?

  • #4 / Jul 31, 2008 7:48pm

    los1sol

    41 posts

    Support on these forms is very hit and miss I found. Vanilla questions get answered pretty quickly but anything too complex and it’s a ghost town.

    I found a way to get this done but it required custom SQL queries and I had to hire somebody to do that for me because clearly I don’t know how to do that.

    Maybe they’ll integrate some of these missing features on 2.0 or at the very least provide better documentation so that you don’t have to bang your head against the wall to figure out how to it. As cool as EE is, its documentation is atrocious.

    Hey guys, how about hiring a technical writer for a week and have him site down w/ a developer and put forth some real documentation on how to do things that people on these boards ask about over and over again and go unanswered?

  • #5 / Jul 31, 2008 8:23pm

    Lisa Wess

    20502 posts

    Hi, los1sol;

    I am sorry to hear that you have been disappointed with your experience, and thank you for the feedback.  We do answer technical support questions extremely quickly, but you’re question is getting into a customization very specific to your site.  We are not able to provide custom solutions for everyone, though we do try to give pointers when possible. 

    I am also going to move this down to How To, where it will get more exposure.

    I admit that I’m not 100% sure what you are looking to do here.  The categories shown are done so due to the information in the URL, and you can read more on that in The Importance of Semantics.

    The weblog categories tag in your first post is intended to show all categories, parent and child alike.  While there is a parent_only parameter, there is not a child_only parameter and that would be a great feature request.  The code you have appears to be working as intended: it lists the categories, then each category link takes you to a category page (example where only entries of that category show up.  This is the expected behavior of ExpressionEngine.

    Perhaps if you could take a step back and, in plain English with no code examples, explain your end goal, then the community would be more able to assist with this.

    Insofar as our documentation goes, it is excellent in what it does: document ExpressionEngine, its tags, parameters, and variables.  It is not intended to show examples of “how to accomplish things” as any given scenario can often be accomplished in a number of ways. We do offer the wiki as a way for the community to share tips and tricks on how to accomplish goals; and the comments on the docs are also there for the community to add information on specific tasks.

    In any case, I’m going to move this down to How To for further brainstorming.

  • #6 / Jul 31, 2008 8:38pm

    jdgraffam

    11 posts

    there is not a child_only parameter and that would be a great feature request

    Where do I request this feature? Are there any plugins or snippets that anyone knows of to achieve this? So are you saying we’re s.o.l.?

  • #7 / Jul 31, 2008 8:59pm

    Lisa Wess

    20502 posts

    You request it in the Feature Request forum.

    You are certainly not S.O.L, though you may need a plugin.  That said, I really am not at all sure what is desired, so I would *strongly* recommend creating a new post in the How To forum for exactly what you want, jdgraffam.  That way the community can help you explore some potential solutions, and we don’t confuse this thread even more. =)

  • #8 / Jul 31, 2008 9:07pm

    asozzi

    262 posts

    A quick search on this forum threw up a ton of good links:

    You may want to add your vote for a child category feature to this topic.

    There is a plugin to help you only show sub-categories here: Subcategories Plugin.

    Or check out the Dynocat Plugin and see if that is better suited helps more.

    There are also some SQL query solutions available: here and here.

    Hope that gives you a start…

  • #9 / Aug 05, 2008 1:15pm

    los1sol

    41 posts

    Hi Lisa, thanks for the response.

    Hi, los1sol…

    I am also going to move this down to How To, where it will get more exposure.

    I originally posted it in the how-to forums actually but it didn’t do me any good.

    The weblog categories tag in your first post is intended to show all categories, parent and child alike.  While there is a parent_only parameter, there is not a child_only parameter and that would be a great feature request.

    Yes, it would. In its absence, a work-around or a hint that it’s not possible out of the box could be extremely helpful.

    The code you have appears to be working as intended: it lists the categories, then each category link takes you to a category page (example where only entries of that category show up.  This is the expected behavior of ExpressionEngine.

    It’s working now because I paid somebody to make it work. They used custom SQL queries which I admit I’m not too familiar with but at least they got it working.

    Perhaps if you could take a step back and, in plain English with no code examples, explain your end goal, then the community would be more able to assist with this.

    Again, this is already done using custom SQL queries that are not documented on this site. But for the record, this is what I wanted to achieve (and which I believe is not an uncommon request around here):

    I wanted a products section that would list a set of categories. Upon clicking on one of those categories, the user would be taken to that category page that would also contain its own set of categories, sub-categories if you will. Upon clicking on one of those sub-categories, the user would be taken to a page with a list of products that fall into that category>subcategory grouping. Upon clicking on any of those product items the user would be taken to that product’s detail page.

  • #10 / Sep 18, 2009 2:53pm

    vibe9

    96 posts

    I wanted a products section that would list a set of categories. Upon clicking on one of those categories, the user would be taken to that category page that would also contain its own set of categories, sub-categories if you will. Upon clicking on one of those sub-categories, the user would be taken to a page with a list of products that fall into that category>subcategory grouping. Upon clicking on any of those product items the user would be taken to that product’s detail page.

    I am currently trying to do the exact same thing.  Anyone have the solution? I have my eye on the dynocat plugin, but the plugin owner’s site currently has a 404 so I can’t download it to try.

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

ExpressionEngine News!

#eecms, #events, #releases