stacks
14th October 2009, 19:23
Hi, Non-technical Magento user here with a problem with static blocks.
Basically, I want to add a few different static blocks to the right and left columns and it works fine for 1 on each side but when I repeat the steps it just displays the same image multiple time.
What I'm doing is adding this test to the catalog.xml
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_column_block</block_id></action>
</block>
</reference>
so the CMSblock called right_colum_block has been made and it works fine. If I want to add in more than one block I'm doing the following code and it just does not work.
<default>
<!-- Mage_Catalog -->
<reference name="top.menu">
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
</reference>
<reference name="left">
<block type="cms/block" name="left.permanent.callout ">
<action method="setBlockId"><block_id>left_column_block</block_id></action>
</block>
</reference>
<reference name="left">
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action>
§ </block>
</reference>
<reference name="right">
<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_sale</block_id></action>
</block>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_pricepromise</block_id></action>
</block>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_column_block</block_id></action>
</block>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
</reference>
</default>
Anyone with more technical insight help me with this one, you can see I have 3 different block ID's for the right column but doing this it always just displays the last image 3 times.
Basically, I want to add a few different static blocks to the right and left columns and it works fine for 1 on each side but when I repeat the steps it just displays the same image multiple time.
What I'm doing is adding this test to the catalog.xml
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_column_block</block_id></action>
</block>
</reference>
so the CMSblock called right_colum_block has been made and it works fine. If I want to add in more than one block I'm doing the following code and it just does not work.
<default>
<!-- Mage_Catalog -->
<reference name="top.menu">
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
</reference>
<reference name="left">
<block type="cms/block" name="left.permanent.callout ">
<action method="setBlockId"><block_id>left_column_block</block_id></action>
</block>
</reference>
<reference name="left">
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action>
§ </block>
</reference>
<reference name="right">
<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_sale</block_id></action>
</block>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_pricepromise</block_id></action>
</block>
</reference>
<reference name="right">
<block type="cms/block" name="right.permanent.callout ">
<action method="setBlockId"><block_id>right_column_block</block_id></action>
</block>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
</reference>
</default>
Anyone with more technical insight help me with this one, you can see I have 3 different block ID's for the right column but doing this it always just displays the last image 3 times.