Reputation: 1156
Sup Stackers!
I need your help dearly. I'm pretty much a beginner when it comes to Magento. I would like to display a custom set of links on my page sidebar, the sidebar that holds blocks such as Categories, Compare Products etc. I've tried the following:
<reference name="right">
<block type="cms/block" name="right.permanent.callout">
<action method="setBlockId"><block_id>favourites</block_id></action>
</block>
</reference>
No result. The above references a cms static block I've created that just contains a UL of links. The indentifier for the block is favourites. Whenever I try to get the unordered list to show on the page by including the above in the CMS page Layout XML via the Admin panel, I get nothing happening at all. One thing to note is that, as a test, I deleted all the content that was currently in my home pages Layout XML and it changed nothing, all the sidebar content still remained.
After trying about 10 different alternatives, I'm still no closer to getting the to work. Anyone got any ideas on how to get this to work?
Upvotes: 0
Views: 1651
Reputation: 61
Your code looks like what it should be to get this working. A few things to check is the "name" attribute and caching. Give the block a unique name, such a "favourites." You can also add a "before" or "after" to position this block exactly where you want to on the sidebar, just reference the block name that you want it to appear before or after.
<reference name="right">
<block type="cms/block" name="favourites" before="-">
<action method="setBlockId"><block_id>favourites</block_id></action>
</block>
</reference>
This should get it working. You mentioned that you removed all the code from the Layout Update XML without any changes taking effect. I don't think caching is your problem but I just want to mention it since it's still a possibility. It may have to do with how the default code is commented out, so all you're doing is removing code that isn't being applied to the layout. Hopefully this helps because I think you're right there, good luck!
Upvotes: 2