0

First I want to say I initially setup the Products section of this site using categories and it works great. BUT, I need more custom fields added to categories which I don't think is possible so I'm exploring alternate methods.

I read about creating a "Categories" channel and adding a Playa field to my "Products" channel to assign a "category". I setup the "Categories" channel and assigned a "category" to each product using Playa.

It's important to have the url structures remain the same as it is in the image below. "Product Cat1, Product Cat2, etc." are the categories. The items listed below those, "Apple, Banana, etc.", are entries with the category assigned to them. I need to be able to dynamically create the sidenav as shown in the pic below. This was relatively simple using the categories tag, but I'm having problems figuring out the template code using Playa.

When a product is clicked, a "product detail" page is shown. Again, I need the URL structure to remain the same as before. If anyone has any comments on the template code for the sidenav and main content area it would be greatly appreciated!

page and navigation structure for products section

3
  • Is "Apple" the title of the entry filed under the category or is it coming from a custom field? Can you expand on this statement "I need more custom fields added to categories". I'm not convinced you can't do what you need with normal category tags.
    – Anna_MediaGirl
    Feb 21, 2013 at 18:20
  • Anna, I ended up not using Playa at all and used info from the link below to get things working. I basically have to create a channel entry named the same thing as a new Category and I use the fields in those entries to add additional content per category. My reason for looking for an alternate method was that I wanted at least 2 image upload fields per category, and only one is allowed. Feb 21, 2013 at 20:39
  • Got it on the 2 images per category requirement. That eliminates using native category tags.
    – Anna_MediaGirl
    Feb 21, 2013 at 21:53

1 Answer 1

0

I got my current setup working using the info from this post https://expressionengine.stackexchange.com/a/177/603. Still wish there was an easier way for the client though.

1
  • You could also setup a simple relation. Store the entry id for the category-channel entry inside the category description field. Then use an embed or stash to retrieve your custom category data.
    – GDmac
    Feb 22, 2013 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.