Search code examples
phpcontent-management-systemexpressionengine

Structuring content in Expression Engine


I need some help figuring out the best way to sctructure content using Expression Engine. I've red the documentation, looked at all information I could find but I haven't found the answer. I hope someone here could help.

What I want to create is a product catalogue that would look like this:

/bikes (product category, displays the product families, two-wheelers, three wheelers etc.)

/bikes/two-wheelers (product family, displays the products in the family)

/bikes/two-wheelers/red-bike (product)

/bikes/two-wheelers/red-bike/wheels (optional product details page)

I understand that EE URI's are template-group/template based and that the content is in channels. I'm not yet sure how categories can be used in this. Essentially I would like to create "simple" parent-child relationschips between the entries and I found a plug-in called Structure that does something like that. Unfortunately, this project needs to be done without additional (payed) plug-ins.

Is it possible for the product to be the channel, and product-family and product-category to be attributes of the product in EE? Would that work? Is there a better way to structure that?

I realise that this isn't a straight-forward question, but I'm still hoping to be pointed in the right direction. Thanks for reading!


Solution

  • Probably what you'll want to do is use categories to break your products up into families. You can nest the categories like so:

    • Bikes
      • Two Wheelers
      • Three Wheelers
      • Tall

    You'd then assign your "Red Bike" channel entry the category of "Bikes" and "Two Wheelers".

    For the extra product detail page, you could probably use related entries. Set up a channel called "Wheel Types", then publish entries for all the different kinds of wheels. Then use a relationship field type in your "Products" channel to associate a specific wheel type to your "Red Bike" entry. You can then link to that detail page using a related entries tag in your template.

    The Structure module would really help you easily craft the URLs you are looking for, but if you can't use it then the Freebie extension should help. But of course the time it takes you to figure out how to use Freebie for your needs would probably be worth far more than the cost of a Structure license.