I want to specify a different list.phtml for showing subcategories within a category when clicking through categories from the list.phtml used to showcase a list of products.
I have one list.phtml that works great for listing subcategories, but then messes up placement of the shopping cart/shopping cart items when showing products.
I have another list.phtml that works great for listing products inside of a category, but doesn't show subcategories of a category when you click on it.
My goal is to specify a different list.phtml for when you are viewing a list of subcategories, from when you are viewing a list of products inside a layout XML file if that is possible.
Thank you!
You can set different layout from admin for category. To set different list.phtml
for parent category you can follow below steps-
In static block you can add your list.phtml
for sub categories using below code
{{block type="core/template" template="path/to/your/file/list.phtml"}} // You can replace core/template with your module/block
Now go to Catalog->Manage Categories
Select the parent category for which you want to display subcategory list
Now select Display settings tab
Now select Static block only in Display Mode
And Select your block from in CMS Block dropdown
Clean cache and check the category pages in frontend
Note : don't forget to add your custom module/block to whitelist from System->Permissions->Blocks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.