1

I'm currently working on an eCommerce project with categories for products:

- Category 1
    - Sub-category 1
    - Sub-category 2
    - Sub-category 3
- Category 2
    - Sub-category 1
    - Sub-category 2
    - Sub-category 3

What I am hoping to achieve, is to give each top-level category its own entry in Craft, so I can apply my site-wide SEO, matrix content and utility fields.

I am aware you can apply fields to categories, but the whole double-clicking on a category and managing the content from the small modal window approach isn't ideal, especially with category pages that are a bit heavy on the content side.

These categories do have their own URL, and creating an entry with the same slug results in incrementation: example-category-1, which is to be expected.

Is there any way in Craft I can get round this? I guess if there is no other way I can apply fields to the category, but I wanted to see if anyone had any other ideas.

3

After a little more consideration, I decided it was best instead not to use categories for this.

I have instead created a 'Product Categories' structure, and the relationships are handled through an entry field.

  • I was just going to recommend this. The big question generally comes down to whether products will ever have more than one parent. If not, then a structure is usually the way to go for all the reasons you mentioned. – Douglas McDonald Nov 4 '14 at 15:08
  • @DouglasMcDonald That's exactly it, took me a while to get there though! And no, products will only have one 'Category' for this project, so on reflection a structure seems to be the way to go. – Jamie Wade Nov 4 '14 at 15:14
  • And if this ever changed, you can also later use categories to superimpose a separate category hierarchy on top of your already structured products. The structure can then just represent the default or canonical product structure. – Douglas McDonald Nov 4 '14 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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