I am trying to create a custom category layout which i need to use for a specific category.
This is what i have done:
1. In System -> Design -> Layouts i have created a new layout.
- Layout Name: Category (catname)
- Store: Default
- Route: product/category_catname
2. In Catalog -> Categories -> Catname -> Design i have set Layout Override to my new Category (catname)
3. In /catalog/view/theme/mytheme/template/product/ i have made a copy of category.tpl and renamed it to category_catname.tpl, then made some changes to category_catname.tpl.
But when i now visit this category page, i cant se any of my changes. I looks like it falls back to the category.tpl file. Why is this happening?
I have read several docs and forum posts regarding layouts and my understanding is that i am doing it the right way, or?
What the layouts system does is allow you to change the layout around the content . The content is what is produced by your category.tpl, but you can have different modules around the content. For example you may have the categories module in the left column for normal categories, but for your custom layout, you may want to add the manufacturers module, Special Offers and / or Featured modules.
I suspect that you are wanting to display the content of your custom category differently to all of the other categories?
The layout system is not designed to do this
Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions

You are right, i want to display the content of a spesific category differently then all other categories. Is there any recommended methods to achive this?
Hope this helps you
Rupak Nepali
webocreation.com@gmail.com
http://webocreation.com
Enjoy! Tips and tricks as well as free module.
Sorry, i dont understand what you are sayingrupaknepali wrote:While inserting the category at the layout tab select your preferred tab by which the category showing style differs
Hope this helps you

In catalog/controller/product/category.php, find:
Code: Select all
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
Code: Select all
if ($category_id == 25) {
$this->template = $this->config->get('config_template') . '/template/product/category_catname.tpl';
} else {
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
}
If you want the flexibility to choose more than one category for the "special" template, this can also be done, but it is more complex. Pm me if it is something you want and would like my help
Kind regards
Google Product Feed - Get your products into Google Shopping. Includes a bulk update facility.
Backup Pro - Backup (on demand or scheduled), Restore and Clone your store.
Freestyle Box - Add multiple information boxes on multiple pages of your store. Includes optional "Code Mode".
View my other extensions
Users browsing this forum: Semrush [Bot] and 55 guests