Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Right procedure to add content block / modules programmatically
Jr. Member
Total Posts:  2
Joined:  2013-01-29

I would like to create 2 custom blocks. Each one will list category links for the navigation. One block will be putted within the header, the second one within the left bar (maybe with more categories then the first one).

Now, i’ve different questions about this:

-) Is it correct to create 2 new modules/block for these purposes?
-) Collateral question: is it correct to say “module” and “content blocks”, in this case, to indicate the same thing?
-) Important: i’m trying to create the module following this procedure, but i can’t succed. I’ve tried to hack the core files and all was working correctly, so i think i should better understand the xml files behavior.
-) about that procedure: is it correct to put within the new class the following constructor instead of the “template” tag within the xml block decalaration?

class Mage_ModuleDirectory_Block_Filename extends Mage_Core_Block_Template
function __construct()

Thanks in advance!

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top