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.

Best approach to retrieving channel content

March 27, 2011 6:36pm

Subscribe [2]
  • #1 / Mar 27, 2011 6:36pm

    Gamer000

    32 posts

    I’ve built a few sites with EE, but I still find myself perplexed when it comes to the programmatic approach to displaying entry’s with multiple categories. I have a site that has two category groups: States, and Item Categories. Users start out by selecting a state which then directs them to a list of varying types of items. When they select an item (this item is only available in the selected state), like furniture, the user is finally taken to a page where they are shown only entries with a specific state and of a specific category item type. The PROBLEM is that it doesn’t really work right, and I find myself using more embedded templates then I would like.

    So the question is: What is the best approach to a site where entries must be listed under a user specified state & are created to be categorized by a type of product?
    I am using EE 2.1.3.
    An example of my URI is: http://www.recyclingassets.com/assets/ohio/56/furniture/13/

    I realize I can find the answer myself but I would love to get some input from the experts on this awesome forum. Thanks!

  • #2 / Mar 28, 2011 1:47am

    Cheif

    626 posts

    I too dislike the category function - it promises so much but IMHO rarely delivers.

    I’d be inclined to alter your logic, create channels for each item “Type” and assign State as a category.

    If you are to have a lot of item “types” then I’d probably look at one master channel that lists all items and use a custom field to define the “type” of item & still use States as the category or states as custom and “type” as categories.

    It depends on how you want to manage what you have, how much info there is, what’s likely to change over time & how you can best direct the customer (UI/UX).

    The site listed provides options but doesn’t clearly direct the user (nee. confusing), this is no doubt a result of trying to accommodate the categories variables. I’d be inclined to structure a more purposeful experience by making the options much more obvious and restrict them to one way or another (initially).

    There are tons of great examples of stores and their approach out there, have a surf, view & dissect what is important to your customers and develop a solution before creating any code.

    My 3c 😊

  • #3 / Mar 28, 2011 8:17pm

    Boyink!

    5011 posts

    Here’s one possible solution:
    http://www.train-ee.com/courseware/free-tutorials/comments/simple-multifaceted-navigation-using-categories/

    Even allows for choosing product first, then state or vice-versa.

  • #4 / Mar 28, 2011 10:51pm

    Gamer000

    32 posts

    Thanks Cheif & Boyink! for the great input. A multifaceted navigation structure is exactly what I am trying to accomplish. I have a site http://www.recyclingassets.com which I’ve constructed using two category groups: “States” & “Asset Categories”. Because of the lack of loose relational parenting or layering of categories I’ve been forced into an extremely linear navigation path both in my user-interface and in my URI. This SUCKS! With EE at-least there’s always more than one way to accomplish a task. I do enjoy the Train-ee tutorials a lot, as I’ve purchased most of them and this example of “multifaceted” navigation looks promising with two categories, but will it be enough? In my current site this tutorial would likely solve most of my problems, but in terms of granularity could I ever extend the layering of categories to a third or even fourth level of selection?

    What do you think about using channel fields for multi-leveled navigation. I find the big issue with this would probably be limiting results when it comes to the State group & the fact that I would seemingly need to create more false granularity through IF statements to return my desired results again obtained from segments of my URI. I was thinking about the possibility of having a third category, but instead of using EE categories I would create a custom field in my asset channel for cities which would hold a unique URL title and could be used in an IF statement to further fine tune my channel results.

    Someone really needs to come up with a module or extension that would extend the functionality of EE categories and let the developer create relational groupings within multiple categories tied to a channel. Ha, talk about database “join” city. Hmm, maybe when I get some free time I’ll work on that, lol. 

    Anyway, I will try out the tutorial and post back with what I come up with. Who knows, maybe this will help some other poor developer out who is in a similar situation.

  • #5 / Apr 03, 2011 8:37pm

    Gamer000

    32 posts

    Well, I followed Boyink!‘s tutorial and the multi-leveled category navigation worked very well. My code is much more compressed & logical. As for the third tier addition of cities, I will just have to attempt it later. From what I can tell having more than two category levels would work and only require an additional join or two added to the sql query.

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

ExpressionEngine News!

#eecms, #events, #releases