If you would like to install additional static blocks in his front, can do this quickly by first of each static block is created. Here, the page identifier / code to be the one, will be called later.
Then only the following line in the PHTML file in place install and off you go:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('eigenerSeitenbezeichner')->toHtml() ?>
If you want to your own style sheet / CSS entry for this block use, Of course it can be provided with a separate class. As an example,:
<div class ="shortlinks"> <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_test')->toHtml() ?> </div>
Then in the can. Css file, the class “shortlinks” be defined.
Used in Magento versions 1.4.1.1 and 1.5.1.0 Comments? Additions? Notes? Gladly!
Weiterführende Links:
(Static) Show block only on homepage
Statischen CMS Block in Seite / Artikelbeschreibung einbauen
How can you in a static block include a .phtml file?
For me it does not work with the following line, although it should work:
{{block type=”core/template” template =”page/subcategory.phtml”}}
Hi,
I am a bit confused. The above line does not have much to do with a static block. As in the o.g. to read instructions, should the line getLayout()->createBlock(‘cms/block’)->setBlockId('EigenerSeitenbezeichner')->toHtml() ?Install> in the file.
This should then fold.
neee, thats not what I meant. under CMS>Static blocks I have created a block and o.g. Line is inserted there. In the categories I have given this static block, so that static block is loaded on the categories pages.
Only the .phtml file is not loaded,although it is present. 🙁
Does it work with Magento 2 or is that just for Magento 1 thought?