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 question
 
Loic_LC
Sr. Member
 
Avatar
Total Posts:  194
Joined:  2007-12-19
Paris, France
 

Hi !

I’ve created a static block with its own identifier (footer_links2) in the admin panel and I’m trying to display it in footer.phtml with

<?=$this->getChildHtml('footer_links2')?>

in cms.xml I’ve added

<block type="cms/block" name="footer_links2">
<
action method="setBlockId"><block_id>footer_links2</block_id></action>
</
block>
It doesn’t work.. What am I missing ? Thanks
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

make sure it’s inside correct handle and reference

<layout>
<!-- 
show on all pages -->
   <default>
<!-- 
adding to the footer -->
     <
reference name="footer">
<!-- 
add here -->
        <
block type="cms/block" name="footer_links2">
           <
action method="setBlockId"><block_id>footer_links2</block_id></action>
        </
block
<!-- 
until here -->
     </
reference>
  </default>
</
layout>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Loic_LC
Sr. Member
 
Avatar
Total Posts:  194
Joined:  2007-12-19
Paris, France
 

ok thanks for that…
but it still doesn’t work and I actually don’t understand how the original CMS static block “footer_links” is being defined...even if I delete all references to footer_links like

<action method="setBlockId"><block_id>footer_links</block_id></action>
in the layout xml files it still shows !
and the CMS static block I’ve created with a different ID won’t show up…
 
Magento Community Magento Community
Magento Community
Magento Community
 
Loic_LC
Sr. Member
 
Avatar
Total Posts:  194
Joined:  2007-12-19
Paris, France
 

Ok just for the records if others run into similar issues...it was a cache problem. I disabled cache from the admin. I think it’s better when working on design.

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