I am a bit confused. I read an article by Alan Storm on βMagento Life Cycle Methods , β and as I understand it, you should use the protected _construct() method to initialize the block. In my case, I just want to set the correct block template. So I guess I should use
protected function _construct() { parent::_construct(); $this->setTemplate('stenik/qaforum/forum.phtml'); }
However, when I look at the blocks of some of the main Magento modules, they seem to use the php __construct method to do this. For example Mage_Poll_Block_Poll , Mage_ProductAlert_Block_Price , Mage_Rating_Block_Entity_Detailed , Mage_Review_Block_Form
Although both methods really work, I would like to know how to do it correctly.
source share