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.

Categories and Subcategories

July 31, 2007 6:51pm

Subscribe [2]
  • #1 / Jul 31, 2007 6:51pm

    Zizzyx

    4 posts

    Hello, I thought I had it all figured out until a got a message saying a category already exists with that name.

    Here is what I am after.

    Layouts (top level/category group)
    
       WordPress(first level)
            1 column (second level)
                   Abstract(third level)
                   Games (third level)
                   Minimal(third level)
                   Sports (third level)
            2 column (second level)
                   Abstract(third level)
                   Games (third level)
                   Minimal(third level)
                   Sports (third level)
    
    
    
        XHTML/CSS (first level)
            1 column (second level)
                   Abstract(third level)
                   Games (third level)
                   Minimal(third level)
                   Sports (third level)
    
            2 column (second level)
                   Abstract(third level)
                   Games (third level)
                   Minimal(third level)
                   Sports (third level)

    There will also be other first level and second level categories for Blogger, Xanga, LiveJournal, etc..(most which will have different names) The one thing that will remain constant are the third level subcategories. I was under the impression that this is how I would make the structure in the category list(above). The problem I ran into is that the third level subcategories can not be created twice. The main reason I need this structure is for a search filter to display only subcategories(3rd level) of a certain category(2nd level) in a first level category. (Does that make sense?) Or whatever the user wants.

    Any help from anyone that understands all that (I’m a little confused myself) would be greatly appreciated!

    Thanks.

  • #2 / Aug 01, 2007 12:48pm

    Robin Sowell

    13255 posts

    Hm- brainstorming here, so take it as such.  Wonder if it would be easier to make two category groups- one for your first and second level; one for the third level- abstrct, games, minimal, sports.  Now- that complicates your navigation a bit- but since you can use an inclusive stack in the cat parameter, it’s possible.  I’ve done it- but you have to get creative with your urls and then likely use a little php to combine the two categories and dump them into the category parameter- where needed.

    So the logic- if you go to ‘xhtml/css category’ with a url of mysite.com/index.php/site/index/C1 - 1 being the cat id for xhtml- all works as normal.  But your third level links need to be added on like index/C1/C5 - strip the C’s out and combine into a variable category=“1&5;” and with that in a weblog tag, you’ll end up with only entries that are in both xhtml and whatever id 5 is- say, ‘sports’.

    Er- that make sense?  It’s messy, but I’ve done it that way.  In my case, I DID want to be able to show ALL of ‘sports’, not just the ones in ‘xhtml’, so it really made sense to use 2 cat groups.  Your case may be a bit different.

    Anyway- brainstorming.  May well be a better way in your particular case.

  • #3 / Aug 02, 2007 1:30am

    Zizzyx

    4 posts

    Okay, well I created 3 Category Groups. One for each of the 3 levels and assigned all of them to the layouts weblog. Now when I go to the publish page they are all there and all I have to do is Ctrl+click on all that apply to that certain post.

    I need to know will this work?

    I figured each actual page with all of the details and code of the template will reside on its own page and will look something like this.

    example.com/index.php/layouts/details/first_theme(or whatever)

    For that I will create a detail template with all the EE tags needed.

    What I am after is a filter in the form of a 4 dropdowns like this site has

    http://www.createblog.com/layouts/index.php?layout=myspace_layouts

    With the way I now have the categories set up can I achieve something like this and will it be straight forward or require custom work?

    Thanks for your reply and any help is much appreciated.

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

ExpressionEngine News!

#eecms, #events, #releases