Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Static blocks not showing in CMS pages
 
kryten
Jr. Member
 
Total Posts:  14
Joined:  2011-03-29
 

SORRY POSTED IN WRONG FORUM!!!

Hi,

I am trying to insert a static block into a CMS page but having no luck.

First I tried to insert the static block with the ‘Insert Widget’ button on the CMS page editor but none of my static blocks are showing up in the list.

Secondly I tried to add the code manually

{{block type=”cms/block” block_id=”domingo_home_page_text”}}
and with
{{block type=”cms/block” block_id=”domingo_home_page_text” template="cms/content.phtml"}}
but the block will not display.

Finally leaving the above code in place I added the following to my CMS page design page layout

<reference name="content">
    <
block type="cms/block" name="domingo_home_page_text">
        <
action method="setBlockId"><block_id>domingo_home_page_text</block_id></action>
    </
block>
</
reference>
again with no luck

I am using Magento 1.5.1.0 and only have the sfc_featured categories addon installed.

I hope someone can help with this.

Many thanks in advance,
Garry

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paul-xib
Sr. Member
 
Avatar
Total Posts:  116
Joined:  2009-02-02
The Netherlands
 

found a fix for this? i have the same problem at the moment :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
kryten
Jr. Member
 
Total Posts:  14
Joined:  2011-03-29
 

Sorry, not found a soloution yet!

 
Magento Community Magento Community
Magento Community
Magento Community
 
JonnyTurner
Jr. Member
 
Total Posts:  30
Joined:  2009-01-06
 

Found this post by searching for the same thing. I created the static block in the CMS and then added this to the template:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('name_of_static_block_identifier')->toHtml() ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
JonnyTurner
Jr. Member
 
Total Posts:  30
Joined:  2009-01-06
 

Sorry, double post

 
Magento Community Magento Community
Magento Community
Magento Community
 
kryten
Jr. Member
 
Total Posts:  14
Joined:  2011-03-29
 

Hi,

Thanks for the reply.

Unfortunatly the inline php does not work inside CMS pages as these are not run through the php parser, all you get is the php code.

Kind regards
Garry

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top