Tag Archives: block

Magento Stages in life Cycle of Block

Blocks are the main part of the Magento so it has own life cycle .so how it works 1) Blocks are declared in layout XML or instantiated using PHP code2) After instantiation the _construct() and _prepareLayout() methods are called3) The controller’s renderLayout() method calls toHtml(); all children are rendered4) _beforeToHtml(), _toHtml() and _afterToHtml Hope this… Read More »

Magento Block Types

Magento uses some mostly commomn built-in blocks which are as follows. core/template: It will renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template. page/html: It’s a subtype of core/template and defines the root block. All other blocks are child blocks of… Read More »