Opencart add additional tpl layout for a category
opencart
Solution
From what I can see, you're trying to hard code each individual template and it's not really going to work in the way you've chosen using layouts for the category. Layout's are designed to arrange content on a page rather than specify templates
I've actually created a commercial version of what you are trying to achieve which can be found here. It allows you to create templates and assign it to one or more pages. It works for products, categories, manufacturers and information pages. It also allows you to specify the template for products under a whole category or manufacturer too
Problem
I am trying to setup additional page and category layouts in Opencart 1.5.4. I have got to a stage where if I enter the route of the new category into the address bar, the new template shows as I want, but I don't seem to be able to register that route change in OC. If I specify the change in the .htaccess file the new template loads as expected, but I don't this is the right answer to the problem (although it works). Addition to .htaccess (not correct method I'm sure) ``` RewriteRule ^skis$ index.php?route=product/categories&path=1 [L,QSA] ``` I have created two new files ``` /catalog/view/theme/default/template/product/categories.tpl /catalog/controller/product/categories.php ``` In /catalog/controller/product/categories.php, I have changed the content to reflect new tpl file; ``` class Controllerproductcategories extends Controller { ``` . ``` if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/categories.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/categories.tpl'; } else { $this->template = 'default/template/product/categories.tpl'; } ``` So in summary - If I specify the rewrite in the .htaccess file the layout loads, if I don't it doesn't. - I have added a new layout in OC and selected it against the category Anyone got any ideas I might try to get this working correctly? I have a load of templates to create for products, categories and information pages so would like to do this correctly. Tx in advance Stu