Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento: <action method="unsetChild"> Not removing a block

I switch the display of Wishlist_Sidebar from right to left, using the following codes, but the sidebar remains in both right and left sidebar.

<reference name="right">                
    <action method="unsetChild"><name>wishlist_sidebar</name></action>
    //.....
</reference>
<reference name="left">
     <action method="insert"><blockName>wishlist_sidebar</blockName></action>
</reference>

How to fix this problem

like image 238
mrN Avatar asked Sep 14 '12 10:09

mrN


1 Answers

I think the unsetChild function might operate using the alias (the as attribute rather than the name attribute. Try using...

<reference name="right">                
    <action method="unsetChild"><name>wishlist</name></action>
    //.....
</reference>
like image 190
Peter O'Callaghan Avatar answered Sep 24 '22 15:09

Peter O'Callaghan