Custom Layout Update XML on Product Page in Magento 1.7

layoutlayout-updatemagento-1.7themexml

I have simple question about custom layout update. I would like to add static block on product page using Product custom layout update but it doesn't work for me.

I've tried to use this code:

<reference name="product.info">
   <block type="cms/block" name="slider" as="slider" before="-">
      <action method="setBlockId">
         <block_id>slider</block_id>
      </action>
   </block>
</reference>

Best Answer

Well it's because by default the template does not render all its child blocks.

To fix that you need to edit the app/design/frontend/<your_package>/<your_theme>/template/catalog/product/view.phtml file and add the following line where you want your custom block to be displayed:

<?php echo $this->getChildHtml('slider') ?>