Call a Block in file layout .xml in Magento - Sulopa Solutions
single,single-post,postid-15915,single-format-standard,,-,ajax_fade,page_not_loaded,qode-theme-ver-5.9,wpb-js-composer js-comp-ver-4.3.4,vc_responsive

Call a Block in file layout .xml in Magento

07 Jul Call a Block in file layout .xml in Magento

Call a Block in file layout .xml in Magento

<block type=”” name=”” as=”” template=””>
<action> </action>

For example analyze syntax declare a Block :
<block type=”page/html” name=”root” output=”toHtml” template=”example/view.phtml”> (1)
analyze sections code,if we¬† see general type = “A / B”, then:

A: Module Name, (1) => page <=> Mage_Page_Block
– Module is declared at:app/code/core/Mage/Page/etc/config.xml
B: Class name of Module A, (1) => html => Mage_Page_Block_Html Class
– To declare in:app/code/core/Mage/Page/Block/Html.php
Note:details about properties declare in Block on type:
* type:Block type,may be Block in Magento, or block in one module certain
* name:The name referrence to Block,this name sole right throughout the website, the block Other Reference to it by name.
* as:Name of Block or Block child, This name block by mode getChildHTML (‘name’) in file template corresponding with Block.
* template:file with extension.phtml,regulations content inside the block,in template may Calls to the other Block (Child Block orany Block that has been declared with Magento)

Jenny Tran
No Comments

Post A Comment