Magento layout (layouts), module (block), template (templates)

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.