1

I'm using Structure in a new EE site and I'm wondering, what's the best way to use a different template when on a category page? For example, I have a section called "Watch" located here:

/watch/

When clicking on a category (film genre) you land here:

/watch/genre/comedy

Then when clicking on a film you land here:

/watch/film/superman

All three of these pages have different templates. I have the /watch/ index template worked out, as well as the detail template for /watch/film/superman. It's the category template for /watch/genre/comedy that I'm unclear about.

Will I need to tackle this with conditional {if …}{/if} statements in a single template, or is there a smarter way?

1

Right now, you'd need to have a placeholder page to show categories because adding random segments to Structure URLs will result in a 404. Or, you can use conditionals in one main template like you mentioned and use Freebie to allow random segments: http://devot-ee.com/add-ons/freebie. Option #2 is more flexible.

| improve this answer | |

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.