Tuesday 2 August 2011

Magento Referencing a *.phtml file in the CMS or using XML and php

 In CMS:

{{block type=”core/template” name=”top_static_links” template=”page/template/top_static_links.phtml”}}

In XML and php:

XML component:
<block type="core/template" name="top_static_links" template="page/template/top_static_links.phtml"/>
php component:
<?php echo $this->getChildHtml('top_static_links'); ?>

Just a php Call - NOT RECOMMENDED!
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('videoBannerStaticBlock')->toHtml() ?>

No comments:

Post a Comment