Posts Tagged ‘magento theme customization’

A simple trick to add static content block in template

March 28, 2009

Just go to your magento admin panel and then CMS -> Static Blocks

Now click on Add New Block button below and there will be a New Block form with some required fields. Now fill up all the required fields and save. Congrats! you have created your new static block . You have an identifier for your static block that you should remember for the next step. Now you can call your static block using the code below

echo $this->getLayout()->createBlock(‘cms/block’)->

at anywhere in your template. You must replace setBlockId(‘yourIdentifierNameHere‘) “YourIdentifierNameHere” with your created  Static Block’s  identifier name.

[It may help you :D]