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.

Quick question on categories and category groups

February 05, 2008 10:14am

Subscribe [1]
  • #1 / Feb 05, 2008 10:14am

    Will Smith

    76 posts

    Hi all -

    I’m new to EE and have spent the last few days familiarizing myself with the system. I find that the documentation is incredibly light on concepts.

    Specifically, I’m trying to understand categories and category groups. The docs say very little about what these constructs actually are or how they should be used. Would someone help me understand them better, perhaps offering an example? For example, in a standard blog, what would be a category, and what would be a category group?

    Also, is it correct to say that the hierarchical relationship between these EE elements is the following:
    Category Groups contain Categories
    Categories contain Weblogs
    Weblogs contain Custom Fields

    I look forward to your help.

    Thanks,
    Will Smith

  • #2 / Feb 05, 2008 10:30am

    Robin Sowell

    13255 posts

    Hm- I’d say:
    Category groups contain categories
    Weblogs can have multiple category groups
    Weblogs can have a single custom field group- a custom field group contains fields.

    And I’d put the ‘Weblog’ at the top of the heirachy, as I tend to create a weblog for each type of data I’ll be using.  So I’d have a weblog for articles, one for images, one for videos- for example.

    Now- say my site is about TV shows- so I might have one category group for the shows I cover- ‘Dr. Who’, ‘Torchwood’, ‘Chuck’- whatever would be the categories in that group.  Say all my articles, vids and pictures will relate to one of those shows.  So- I’d assign my ‘TV category group’ to each of those weblogs.

    Now when I write a new article, I make sure to assign it to the correct show- which is available as a category choice.

    But- say my articles take several forms- ‘Reviews, Episode Summaries, Gossip’- whatever.  My vids and images aren’t broken up this way, but my articles are.  So- I create a new category group called ‘Article Type’- and I assign that group only to the ‘Article’ weblog.  If I write an article on the latest ‘Torchwood Gossip’- I assign it to the ‘Torchwood’ category and the ‘Gossip’ category.

    Now on my frontend, I have primary navigation by show- and I can easily see all articles on ‘Torchwood’.  But I may also have navigation by ‘type’- a section for all of my episode reviews, all the gossip, etc.  And if I’m creative with things- EE’s weblog tag allows you to return entries that are in BOTH specified categories- so I could have some subnav in Torchwood that allows them to see just the ‘Torchwood gossip’.  Or- all ‘Torchwood’, or all ‘Gossip’.

    Of course- there are a million ways to structure this stuff- how I’m going to do it depends on the data types and the desired frontend navigation.  (I’ve got one site I’m working on for a friend- it’s all nicely categorized and such- lot of backend flexibility on how we can pull the data out.  But he’s struggling figuring out how he wants it to look.  I keep having to tell him- ‘Dude- you need some navigation in there.  Why have all of these lovely logical categories if you aren’t going to use them to navigate around the site.’  Heh.)

    I digress.  But that’s one way things may work.  And while you’re reading up and getting the hang of things?  I’ll highly recommend Boyink’s tutorial- it’s pretty advanced and goes pretty deep, but he walks you through it in a way that’s easy to understand.  Makes for a really good example of building a complex EE site.  EE’s flexible- there’s always more than one way to do things- but the more examples you see, the easier it will be to develop your own personal approach.

  • #3 / Feb 05, 2008 12:13pm

    Will Smith

    76 posts

    Awesome answer, Robin. Thank you! I’ll also take a look at Boyink’s tutorial.

    Thanks again,
    Will

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

ExpressionEngine News!

#eecms, #events, #releases