Sunday, January 15, 2012

Magento Layout Elements

Layout Elements Which magento generally used in there XML
label: It helps the label of the handle which is shown as a descriptive reference in some areas of the admin panel.
reference: It is used to link an already defined block in any layout XML. To add any child block to an existing block, to modify attributes of an existing block or to perform any action on an existing block, the reference element is used to link to the existing block. The reference element must have a name attribute which refers to the existing block name.
block: It is used to define a new block. This element is usually defined inside a reference element when we want to create a new block. The block element must have a name attribute, which is a unique identifier of the block in the layout and a type attribute, which defines the block class name. If the block is of type or subtype of core/template, it can also have the template attribute which defines the actual phtml template file to be used for rendering the block
remove: It is used to remove an existing block from the layout. The block to be removed is specified with the name attribute
action: It defines an action to be performed on the referenced or newly defined block. An action is simply a method of the block instance on which it is to be executed. The method attribute defines the method name in the block instance and all child elements of the action element are treated as parameters to the method. This element can be placed inside reference or block elements.
update: It will loads an existing layout handle into the current layout handle. It provides a kind of inheritance of layout handles. It must have the handle attribute, which defines the handle of the block to be included.

No comments:

Post a Comment

Thankyou for your Comments

LinkWithin

Blog has moved, searching new blog...