Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.92 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Magento: unset a second/third level block from layout?
  2. <reference name="content">
  3.             <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
  4.                    <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
  5.             </block>
  6. </reference>
  7.        
  8. <reference name="content">
  9.     <action method="unsetChild"><name>product.info</name></action>
  10. </reference>
  11.        
  12. <reference name="product.info">
  13.     <!-- use the alias here -->
  14.     <action method="unsetChild"><child>media</child></action>
  15. </reference>
  16. <reference name="new.parent">
  17.     <!-- use the full block name here -->
  18.     <action method="insert"><child>product.info.media</child></action>
  19. </reference>
  20.        
  21. <reference name="product.info">
  22.     <action method="unsetChild"><name>product.info.media</name></action>
  23. </reference>
  24.        
  25. <remove name="product.info.media" />