1. First create a layout app/design/frontend/base/default/layout/local.xml
Note: The layout zoom path base represents the current front-end theme, and the local local.xml in the PackageType contains the type of file that represents the block's type template with the address 2 of the block-contained templates, creating a template app The path behind the/design/frontend/base/default/template/and the correspondence in the template above
3, modify Indexaction as follows and then refresh the page page into a red background public function indexaction () {//echo ' Hello index! '; $this->loadlayout ();-----load Layout $this->renderlayout ();----render layout}4, make further modifications to local.xml let him create different templates for different actions 5, Nesting between block
6, getchildhtml get the content of the page <body><?php echo $this->getchildhtml (' Customer_form_register ');?> </body>
Magento layout (layouts), module (block), template (templates)