suyati04 Posted December 23, 2015 Share Posted December 23, 2015 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 More sharing options...
yaniv14 Posted December 23, 2015 Share Posted December 23, 2015 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 More sharing options...
suyati04 Posted December 24, 2015 Author Share Posted December 24, 2015 (edited) 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 December 24, 2015 by suyati04 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now