Saturday, 4 July 2015

How to change page layout in Magento

There are in few steps,you can page pay layouts.

For change the page layout,you need to change root block  template(<reference name=”root”>) using setsetTemplate() method  ,So use <action method=”setTemplate”><template>YourPageLayoutLocation/YourLayput.phtml</template></action>

and apply this template by  <action method=”setIsHandle”><applied>1</applied></action>

 

<?xml version="1.0"?>
<layout version="0.1.0">	
	.......
   <HandlerName>
     <reference name="root">
         <action method="setTemplate"><template>YourPageLayoutLocation/YourLayput.phtml</template></action>
	 <action method="setIsHandle"><applied>1</applied></action> 
     </reference>
   </HandlerName>
   [...]
</layout>

 

Suppose i am changing template   in checkout cart page

<checkout_cart_index translate="label">
 <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
         <!-- Mark root page block that template is applied -->
         <action method="setIsHandle"><applied>1</applied></action>
    </reference>
 </checkout_cart_index>

  How to Upgrade magento version from 2.3.x [EE] to 2.3.x [EE] Here are the steps I used to successfully update Magento 2.3.3 [EE] to 2.3.5 ...