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

1 Answer

0 votes
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 9.1k views
asked Jan 30, 2018 in Frameworks by Doumeki (480 points)
+1 vote
1 answer 7.8k views
asked Jan 31, 2018 in Magento by Edward121 (260 points)
0 votes
1 answer 14.5k views
0 votes
1 answer 9.1k views
+1 vote
1 answer 5.9k views
0 votes
1 answer 2.4k views
asked Feb 14, 2017 in Magento by Toms
...