In one of my previous posts, I wrote about how to show a block in a .phtml file but some people asked me about the static block. So here is the solution:

Please put this piece of code into a correct place of the .phtml file that you want to show a static block.

getLayout()->createBlock('cms/block')->setBlockId('my-new-block')->toHtml() ?>

So simple, right?

 

Related Tutorials

Author

Why Magestore? We believe in building a meaningful & long-term relationship with you.

Write A Comment