2

I'm customizing the layout in CE-1.9.2.2. After selecting a product in the grid, I get to the productdetails. This page is shown in 1column-layout. I want to use the 3column-layout in this view.

I know I can change the view for each product seperately, but I wan't it to be changed for all and as default.

Where do I look?

1 Answer 1

1

the fastest way is redifine the root template for those routes in a local.xml:

[root]/app/design/frontend/{your_package}/{your_theme}/layout/local.xml

Then apply this:

<reference name="root"> <action method="setTemplate"><template>page/{your_template}.phtml</template></action> </reference> 

to all "product-list" related routes, these are:

<catalog_category_default/> <catalog_category_layered/> <catalogsearch_result_index/> <catalogsearch_advanced_result/> 

for "product-view"

<catalog_product_view/> 

So for the catalog_product_view route the complete code would be:

<?xml version="1.0"?> <layout> <catalog_product_view> <reference name="root"> <action method="setTemplate"><template>page/{your_template}.phtml</template></action> </reference> </catalog_product_view> ... other routes ... </layout> 
7
  • I created : [root]/app/design/frontend/outletdrogist/default/layout/local.xml with <catalog_category_default> <reference name="root"> <action method="setTemplate"><template>page/3columns.phtml</template></action> </reference> </catalog_category_default> and that for the 3 other routes. Cache is disabled, but yet gives outletdrogist.nl/staging/eyelove-brillenkoker.html 1 column. outletdrogist.nl/staging/nieuw/… is set by hand and in 3 columns. Commented Dec 29, 2015 at 20:03
  • if local.xml did not exist yet, you need to add also <?xml version="1.0"?><layout> at the beginning and </layout> at the end Commented Dec 29, 2015 at 20:41
  • @fschmengler tnxs i'll update my answer. Commented Dec 29, 2015 at 20:52
  • I think I'm still missing something here. I added the xml and layout-tags, but still 1 column. I don't have to whitelist local.xml or something like that? Or do I need another route like <catalog_product_view>? Commented Dec 29, 2015 at 23:10
  • Right! your link point to a catalog_product_view not a product grid. you just need to change the root template for: <catalog_product_view> route Commented Dec 29, 2015 at 23:16