0 votes
324 views
asked in Magento by
How can we call a static block directly in Magento?

1 Answer

0 votes
answered by
You can do this simply by calling this method below.

<?php

echo $this->getLayout()->createBlock('cms/block')->setBlockId('block-name')->toHtml();

?>

You may thank someone else for this, as I have got this from some other article online long before :)

...Kat

Related questions

+1 vote
2 answers 1.9k views
+1 vote
1 answer 1.7k views
0 votes
1 answer 5.2k views
0 votes
1 answer 4.2k views
+1 vote
1 answer 2.9k views
0 votes
1 answer 991 views
asked Feb 13, 2017 in Magento by Toms
...