Magento Forum

php code on homepage content
 
TapwellBathroom
Jr. Member
 
Total Posts:  15
Joined:  2013-03-08
 

I’m new to both Magento and PHP, so please bear with me.

I want to place some PHP code within the homepage content area.  I’ve tried doing so via CMS (dropdown) and entering the code in the Design - Layout Update XML area for the Homepage page.

But it didn’t work.  So I tried adding my own new block to the existing blocks and created a new content.phtml file in a folder named ‘home’ in templates, like so:

<block type="template" name="home.content" template="home/content.phtml" after="cms_page" />

This didn’t work, no surprises.  Could someone let me know where I’m going wrong?  I just want to add some functionality to the homepage content.  I know my understanding is probably very much arse about face, but I just can’t figure it out for the life of me.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
TapwellBathroom
Jr. Member
 
Total Posts:  15
Joined:  2013-03-08
 

Well I got it working.  I just changed block type from ‘template’ to ‘core/template’.  I’m sure I’m not doing this the right way but it seems easier to do it this way for now.

Still, if anyone has an article explaining Magento Layouts/Templates and blocks in layman’s terms, please feel free to post it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magneto800
Member
 
Avatar
Total Posts:  60
Joined:  2013-03-15
 

Thanks for the update. I know a lot of forum members could benefit on this info. Thanks a lot.

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