{"id":40,"date":"2009-12-09T22:01:00","date_gmt":"2009-12-09T22:01:00","guid":{"rendered":"http:\/\/www.codeboss.in\/web-funda\/?p=40"},"modified":"2009-12-09T22:01:00","modified_gmt":"2009-12-09T22:01:00","slug":"magento-how-to-call-static-blocks-from-phtml-pages","status":"publish","type":"post","link":"https:\/\/codeboss.in\/web-funda\/2009\/12\/09\/magento-how-to-call-static-blocks-from-phtml-pages\/","title":{"rendered":"Magento :: How To Call Static Blocks From PHTML Pages"},"content":{"rendered":"<p>Magento offers the web master to put static contents where ever he likes in the site with the help of CMS -> Static Blocks.<\/p>\n<p>These blocks can be easily edited from the admin panel. <\/p>\n<p>To call and show their contents on any phtml file write the following code.<\/p>\n<pre class=\"brush: php; html-script: true\"><br \/>echo  $this->getLayout()->createBlock('cms\/block')->setBlockId('identifier')->toHtml() ;<br \/><\/pre>\n<p>Here <span style=\"font-style:italic;\"><span style=\"font-weight:bold;\">identifier<\/span><\/span> should be replaced by the identifier of the static block.<\/p>\n<p>Njoy \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento offers the web master to put static contents where ever he likes in the site with the help of CMS -> Static Blocks. These blocks can be easily edited from the admin panel. To call and show their contents on any phtml file write the following code. echo $this->getLayout()->createBlock(&#8216;cms\/block&#8217;)->setBlockId(&#8216;identifier&#8217;)->toHtml() ; Here identifier should be&hellip; <a class=\"more-link\" href=\"https:\/\/codeboss.in\/web-funda\/2009\/12\/09\/magento-how-to-call-static-blocks-from-phtml-pages\/\">Continue reading <span class=\"screen-reader-text\">Magento :: How To Call Static Blocks From PHTML Pages<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[54,57],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-magento","tag-php","entry"],"_links":{"self":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}