1

I am trying to set template for root block in default handle in local.xml file.But when I reload the page , nothing appears.After changing default to checkout_cart_index or any other request specific handle, page is rendered.how do i change template in default handle.

Here is my local.xml

<layout> <default> <block type="page/html" name="root" output="toHtml" template="page/2columns-right.phtml" /> </default> </layout>

2 Answers 2

1

Balaji.

you need just set reference name and don't require to define block type again.

<?xml version="1.0"?>
<layout>
    <default>
    <reference name="root">
         <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </default>
</layout>

See at My blog

1

Amit forgot to close the reference handle

This should work:

<default>
   <reference name="root">
      <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
   </reference>
</default>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.