Developer forum

Forum » Templates » Different product template for different products

Different product template for different products

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

Is it possible to have different product templates for different products? Eg. based on what group they are in, or what values the products have?

I have tried setting up a maintemplate that checks for different values, and includes a partial producttemplate based on the values of the product - but this becomes a mess, and throws an error because <text> element is not closed etc.

How can i have different product templates for different products?

/Hans


Replies

 
Nicolai Pedersen
Reply

Hi Hans

You can (kind of), but requires a bit of implementation.

Usually products in one group are of the same kind. On a group, you can set a primary page. When rendering the product list and linking to the product detail, that primary page can be taken into consideration and used in the link. In this way you will have multiple product pages with the catalog app - each can have a different template (and settings).

It is going to be part of the next release of Swift just after new years.

 

You must be logged in to post in the forum