php - Remove all blocks from Magento template -


i want remove default blocks template/layout file of custom magento module. have used individual removes like

<module_cart_index>    <remove name="head" />    <remove name="header" />    <remove name="footer" />    <remove name="right"/>    <remove name="left"/>    <remove name="cart_sidebar" />    <remove name="checkout.cart" />    <remove name="sale.reorder.sidebar" />     <reference name="content">         <block type="checkout/cart" name="cp.cart" template="module/cart.phtml" />     </reference> </module_cart_index> 

i want output cart.phtml should not contain code magento should contain code written in it.

right when run http://127.0.0.1/mag/index.php/module/cart/ outputs complete html page <html>, <head>, <body> , other tags. how can remove these tags? want content written on module/cart.phtml.

is there way remove/prevent default layout rendering in magento?

if want create json response, can echo controller. if trying else, should you:

  1. create blank.phtml in template's page folder. file should have @ least line:

    <?php echo $this->getchildhtml('content') ?>

  2. in layout put code:

<module_cart_index>

<reference name="root">     <action method="settemplate"><template>page/blank.phtml</template></action> </reference> <reference name="content">     <block type="checkout/cart" name="cp.cart" template="module/cart.phtml" /> </reference> 

</module_cart_index>


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -