Post by chulann » Thu Jan 17, 2013 2:15 am

I am using default theme/V1.5.4.1

To recap: Present system provides listing pages of products within categories/subcategories, from which you can select individual products to be displayed on their own page. Using a common layout structure through the system.

I have a situation where one (and only one) subcategory needs the product listing to be displayed differently. The individual products themselves can still be displayed normally.
The bulk of changes I can manage by (I believe) creating modified product/category.php and product/category.tpl files.
My problem is a lack of understanding of how to call that layout for the one sub-category.
Can anyone provide me with a little guidance on this?

New member

Posts

Joined
Sun Aug 28, 2011 11:30 pm

Post by ChetanCx » Thu Jan 17, 2013 2:31 am

in file template/product/category.tpl you can add if clause like this

Code: Select all

<?php if($heading_title == "your_special_category_name") { ?>
//your custom code
<?php } else { ?>
//the orginal code 
<?php } ?>
this is the least editing method you can get ( i guess). other method is creating a new tpl for that category and link to that tpl using product/category.php controller (again using if else)

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by chulann » Thu Jan 17, 2013 9:39 pm

Thanks ChetanCx.
Your tip is very helpful to me.
I was having great difficulty in following the flow of the layouts.

New member

Posts

Joined
Sun Aug 28, 2011 11:30 pm
Who is online

Users browsing this forum: No registered users and 210 guests