Creating Static Blog in Magento

In Magento, We have option to add the static block with static content and also We can insert the image in static block. In future, we can change that image without editing the code in file.

Here is the method to create Static block.

Step:1

Select the static blocks from cms in the back end.

cms1m

Step:2

Select Add New Block.

createblock1

Step:3

Give the block Title Identifier name.

Click the show /hide editor in content and insert the image then Save block.

banner_backend1

To view the static block in front end give the following code in the header.phtml file or any newly createing file.

getLayout()->createBlock(’cms/block’)->setBlockId(’block_banner’)->toHtml(); ?>

Then we can view the static banner in the front end.

banner1

  • Share/Bookmark

This entry was posted on Saturday, May 7th, 2011 at 4:19 am and is filed under Ecommerce templates, Magento Admin, Magento Templates. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

« Back to text comment