You can add a static block to a CMS page by using the tag

[crayon]{{block type=»cms/block» block_id=»home-page-promo»}}
{{block type=»cms/block» block_id=»your_block_identifier» template=»cms/content.phtml»}}[/crayon]

This is useful on Landing Pages, where the content of the page is determined via an HTML text field.

If you want to add a static block to a .phtml file, use this code
[crayon lang=»php»] getLayout()->createBlock(‹cms/block›)->setBlockId(‹identifier›)->toHtml() ?> [/crayon]

(replace identifier with your page identifier)

Tagged:

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.