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.

Organizing content in EE2

February 02, 2011 2:51pm

Subscribe [5]
  • #1 / Feb 02, 2011 2:51pm

    mattwildman

    6 posts

    As this is my first EE2 build, I want to make sure everything goes quickly and smoothly. Before I dive in and reach the point of no [easy] return, I’d like to get some opinions or experiences of other EE2 devs.

    I’m creating a site with a deep structure. The two main sections are Products and Support. Each will have every product listed (~12). Here’s an example of the structure for the support section: each separate product support page will be split up into videos, faqs, troubleshooting, downloads, and macro examples. The latter will be further divided into commonly used programs (word, excel, etc) and each of these programs will have multiple code examples on separate pages. So, now - at its deepest - we’re at: site/support/product/macros/officeapplication/macrox.

    Does anyone have any recommendations on how they would go about organizing the content for a site similar to this? At which point (or to which depth) would you stop creating more channels and start creating categories/subcategories? How should I manage my templates without manually editing page urls. Third party add-ons are also on the table, especially if it makes it easier for my client to manage content. If anyone is willing to help but needs more detail, post and I’ll be sure to quickly write a response. I don’t mind doing research, so pointing me in the right direct will be appreciated - but I have already completed the EE2 tutorials and Building with Expression Engine 2 book and overviewed the support section and userguide on EE’s website. I’m really looking to get advice from someone who has designed something similar to what I’m discussing.

    Thanks, Matt

  • #2 / Feb 02, 2011 7:38pm

    mattwildman

    6 posts

    I found this support thread very helpful in answering my questions and gaining perspective.

  • #3 / Feb 03, 2011 4:25am

    CDT

    93 posts

    I think the point of the other thread, when they got to it, about thinking about EE differently is a really good idea.  A user shouldn’t have to go only one route to get to the content they’re looking for (that’s so 1990s!).  If you are thinking you have 5 levels of hierarchy, you need to revisit that.  Think horizontally. I think a good rule of thumb is 3 clicks.  If it takes more than 3 clicks to get to something, it’s too many.

    If you look at how EE approaches their website, it is mostly horizontal, not vertical. The site is intuitive, for that reason, and their design seems like a no-brainer, but someone else could have easily thought of making the site navigation hierarchical, and it would be awful. The menus allow the user to get to the area they need quickly, with the menus displayed all the time, so they can quickly jump across and down again, if they want. 

    As was said in the other thread, relating entries with Playa is going to be a good way of handling something like this.  Think of each of those separate areas as belonging to a product entry, and each will have a channel of their own, so you’d end up with Products, Support, Faqs, Troubleshooting, Downloads, and Macro examples, etc., as channels.  All of them (except Products) would be related to Products (with the use of something like a Playa matrix field). Although the setup of the channels seems flat to you at first, it is how you relate each entry to another that determines its parent/child relationship.  It seems (from your description), that product is the parent, and all else are children (well, siblings).

    When you create your templates then, most of your coding will be related entries, driven off the product, but because you are keeping the faqs, troubleshooting, downloads, and macro examples in channels of their own, you COULD display the data in those channels vertically as well, such as a Video template, that shows all your videos, with links to the product the video is describing, all the downloads together, with links to the parent its describing (and each could have displayed a “other content avaiable” with links to all the areas the user isn’t currently looking at, by pulling the related content from the parent).  FAQs could be all in one place, related to products using an embed. Users will spend more time looking at content for other products because you’re allowing them to discover more of your content that isn’t directly related to one item/product. You can do that because you can have reverse relationships, where the child/sibling links to the parent record.

    Support could pull from the product’s description, when needed, and not contain a replica of what is in Products, but only content that is specifically support related.  Product is (what used to be called) the header record, and support (by its nature) is transactional—you have many transactions related to a single parent.  Support MAY have a “header” too, if you are planning to have content that defines, in general, a description of the support that is available for a product, but then you’d have two support channels, one for general descriptions (that was fairly static and could be done with Pages) and a second channel for issues/trouble report type content.

    In the old days (trust me, I AM old) database design took months and the front end took days.  We really were working with relational databases, not the hierarchical poor cousins we have today. Nowadays, people spend far too little time fleshing out the database and all their time coding the front end.  That’s because the database designs/schemes are lousy.  You are to be commended for thinking about this!  We had to spend a lot of time considering how a database would be accessed because systems were slow and data storage was expensive, and so hierarchical databases came along to control access and bangs against the servers.  Now databases are so cheap and so fast those things aren’t a consideration.  So relational databases, truly relational, are the way to go… and you can do all of that by using related entries (and the cool add-ons available in that arena).

    It also sounds like this is a learning-on-demand type system, and with those types of systems you cannot define all the paths for the users.  Users have to be able to define their own paths.  All the knowledge bites have to stand on their own (be complete) and not dependent on a user going from A to B then to C.  They might go to C, then H in another portion, then A again.  It makes writing the content a pain, but that’s too bad.  User acceptance will be horrible if the hierarchy is too deep and they can’t find the bits they need, but only the bits they need, without having to go through content they already know. (Hot-linking, in a Wiki-style format, is another way that you can help users get around a site like that, but that is accomplished by properly training your content designers.) 

    I hope my rambling makes sense/helps.

  • #4 / Feb 03, 2011 9:29am

    Mark Croxton

    319 posts

    I faced a similar dilemma when building a product cataglogue. I had thousands of products that might appear in one or more product ranges, one or more product types and styles. I wanted a deep hierarchy that reflected the information architecture, but I also wanted the flexibility for content to appear in more than one place and to be searched/filtered dynamically.

    I chose to mix a Structure tree with multiple categories groups (range, type, and style). What I realised was that you could use a Structure url as the route for an dynamic application, so instead of conventional /template_group/template style routing, I could do /my/nested/structure/url/parameter1/parameter2.

    The trick in my case was to use htaccess mod_rewrite rules to rewrite the parameters to query strings, e.g…
    /my/nested/structure/url?action=parameter1&id=parameter2.

    ...but you can now do this much more easily with the Freebie extension and still use segments instead of query strings:
    http://devot-ee.com/add-ons/freebie/

    In my template for the page I use Switchee to route based on the action, eg:

    {exp:switchee variable = "get:action" parse="inward"}
        
        {case value="ranges"}
            List products assigned to category contained in parameter2
        {/case}
        
        {case value="product" default="Yes"}
            Show product with url title contained in parameter2
        {/case}
    {/exp:switchee}

    Make sense?

    EDIT: this is the site, in case you’re interested:
    [REDACTED]

  • #5 / Feb 03, 2011 5:39pm

    mattwildman

    6 posts

    Thanks to both of you for the response! Mark, nice work. I was looking into Structure but read that it has some difficulty working with categories. What do the parameters reference? Do they correspond to categories and subcategories assigned to the channel entries?

    CDT, I really like the idea of relating entries of “supplementary” channels to entries of a main product channel. In a situation like this, where I’m only relating things to one channel, is a tool like Playa justified or are the built-in relationship capabilities of EE2 sufficient? I’m starting to mess around with the basic functionality of relationships and I’m sure I’ll realize soon enough if I need Playa. When you say “Playa Matrix field”, is this a combination of both the Playa and Matrix addons? If true, I think I’m lost :/.

    Also, I want to make sure that my use of categories will properly mesh with my relationships. Take the FAQ section for instance. I have categories that separate my FAQs into a Presales and Support section, both with multiple subcategories. If I have a FAQ channel that is composed of entries related to various products, will I be able to create a Presales FAQ template for Product A that displays the relevant subcategories and entries - but only for entries that have a relationship to that product?

    Note: If I’m approaching anything from an awkward angle/perspective, set me straight! I realize I’m tackling a relatively large project with very little knowledge of EE (or of any cms for that matter). Because I’m an employee at the company for which I’m developing, I want to make sure the design is as clean and usable as possible. After all, I’m going to one of the guys responsible for adding content and dealing with any issues that arise - for years into the future 😊. I chose EE because of my extensive background with html and css (and enough php/mysql knowledge crammed into my head to create a few web applications). The flexibility I have is great. I don’t have to conform to visual layout and design restrictions like I would with other CMS’s. Because of this, I already have all of the core template html, javascript, and css completed. From here on out, it’s just an issue of organizing content.

  • #6 / Feb 04, 2011 7:24am

    CDT

    93 posts

    Categories can get a bit tricky and messy.  About half the time I’ve created custom fields, for the sole purpose of being able to divide content in a channel tag.  The other half of the time I’ve used categories.  You can’t sort entries by categories, so if you think that’s how you’d use them, use custom fields for that instead.

    Not sure how much you’ve gotten into the way things work, so I’ll explain a bit (forgive if you know this already).  The advantage of categories is that the content that is served up can be dynamic, with nothing more than a click on a link.  It can cut down on the number of templates you need to create for content that is only unique by category.  A URL that has the category in it, template_group/template_name/Cn (where ‘n’ is the category number), limits the content displayed to only entries belonging to that category, in the same way that an entry ID limits the content to a specific entry.

    You can always turn that off, by adding dynamic=“off,” but if you’re going to have to turn it off more than leave it on, then there’s an argument that it isn’t its best use.

    You can get into conflicts with related entries if the categories with each don’t match.  BUT! You can use embedded templates, and set the child to be “dynamic off,” when they don’t share the same category structure, and still take advantage of the category heading tag for the parent templates, or the reverse, by setting the embedded parent template to off.

    Sub-categories make things even more complex, and you’ll stare at the setting to have “automatically include parent” and wonder which is the best approach. 

    I think it is something you are going to have to play with. Set up a test with a few different category groups and see if it works the way you think it does.

    Categories are NOT channel attributes, as fields might be attributes.  Channels are a completely separate DB table.  When you click to add a category to an entry, the system creates records linking the category to entry ID (for however many categories are selected).  It isn’t like a multi-select field in the channel.  For that reason, some of the things you might be thinking categories should/would do, won’t.

    Categories are really powerful tool, but I think they can be over- or wrongly-used. IMHO, categories should be fairly consistent across data that is consistent, and they should be more conventional than non.  If you think of a grocery store, that is a easy to understand example where traditional segregations of data with categories makes sense:  produce, dairy, HBC, bakery, etc.  If it becomes something more like an attribute, those should be fields, not categories.

    (You could not create a “Products” channel and use categories in its place… and use the same category group for all your channels to link everything.)

    Also, because category is in the URL, you can test for it in your templates, formating/selecting different elements based on what appears there.  This is done with conditionals, such as if segment_3 == C57, show X, if segment_3 == C58, show Y.  I’ve used this to create dynamic menus, where the menu option changes color, based on what’s in segment_3, giving the illusion that the system knows what page the person’s on.  You can also force sub-menus to display in the same way… but you gotta be careful with sub-categories with a technique like that.

    The bottom line is that categories should be something that will allow the user to display different content on the same page, not as a field that you hard-code in a template to limit the data. 

    I like Playa, and a matrix field is another field type that can be used with it. Sorry, probably too much superfluous information.  I like the interface of Playa because dragging across multiple selections from one pane to another is an interface people understand intuitively.  It allows you to have a one-to-many relationship. This can be useful for creating inventories, where you have product “bundles.”  Let’s say you have a components channel and then a products channel, where the products are made up of the components (like a kit that contains 5 or 6 discrete items that can also be sold separately).  If you’re only linking a one-to-one, the standard EE relationships will work.  If you need to keep track of discrete part numbers that can be sold alone OR in a batch/bundle, Playa is what you’ll need to do that.  If you need to create many-to-one then you’ll need something like Playa.

    You might have a video or download that applies to more than one product, or a product that will have more than one video.  If that’s the case, you might need more than the standard EE relationship field.  If you start adding fields such as video_one, video_two, video_three, etc., that’s when you should use Playa. (There may be other one-to-many relationship add-ons. I only know of Playa.)

    I no longer do this stuff for a living, and I’m torn between envying you and extending my sympathies.  It sounds like your project is enormous and you’ll wish you knew at the beginning what you’ll know at the end.  EE is an incredible tool. I’ve been using it in its various incarnations for almost 10 years.  The learning curve is a bit steep, not because of any fault on the developers part, but because it IS so flexible.  You have ENDLESS flexibility, which means you can also have endless complexity.  Just know that there is a way to do anything you want to do.  You just may not know the best way to go about doing it.

    Once again, hope that helps.  I’m (temporarily) disabled/retired, so helping out buddies with this stuff is how I keep my hands in it and keeps my mind sharp, I hope.  Feel free to drop me an email if you need someone to run an idea past.  I’m a total flake with reliability (I’m disabled for a reason), but I’d be happy to try, when I can.

  • #7 / Feb 04, 2011 9:45am

    Mark Croxton

    319 posts

    What do the parameters reference? Do they correspond to categories and subcategories assigned to the channel entries?

    Yes, in my case my categories were nested down to three levels, so I wanted my url scheme to reflect that. I wrote a plugin to return a list of entries (products) assigned to those categories. Note that when I assigned a product to a child category I wanted the parent always to be selected as well, so that the product would appear in both the parent and child category, eg:

    /products/ranges/1900-classic/showers/wall-showers

    Will list all showers in the ‘wall-showers’ category AND the ‘showers’ category AND the ‘1900-classic’ category

    /products/ranges/1900-classic/showers/

    Will list all showers in the the ‘showers’ category AND the ‘1900-classic’ category

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

ExpressionEngine News!

#eecms, #events, #releases