Jump to content

Different Layouts For Categories


suyati04

Recommended Posts

Hello Everyone,

 

My template has a requirement where there are 2 different layouts for Category Pages, i.e. product list page.

One is 1-column and other is 2-column left. Need some details regarding how to achieve this.

There will be more than 1 categories for each layout.

 

Thanks.

Link to comment
Share on other sites

You will need to override category class and add a new field (Boolean field maybe) so you can call in the template.

You can get a general id at this link: http://nemops.com/extending-prestashop-objects/#.VnsV6_l97RY

 

or you can do it manually (not recommended) in category.tpl like: {if $category->id == 1 || $category->id == 2} Load different tpl file.....{/if}

Link to comment
Share on other sites

Hello yaniv14,

 

Thanks for the reply. I tried as you explained and added the condition in header.tpl to load the left column div in the newly added attribute value matched my condition.

It can be achieved this way, if no other way available. So can be considered as one of the way to achieve the requirement.

 

Thanks again for the reply.

Edited by suyati04 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...