0

i want to call my custom siderbar on product detail page only below is code i am using in admin > categroy > custom design

<reference name="left">
      <block type="core/template" name="Designer Sidebar"  template="page/design/sidebar.phtml"/>
</reference>

but it add sidebar on all pages how to restrict it for product detail page only as now my custom sidebar also show on product listing page i do not want it there

based marius answer i update my code to below:in admin > category > custom design

<catalog_product_view>
<reference name="left">
      <block type="core/template" name="Designer Sidebar"  template="page/design/sidebar.phtml"/>
</reference>
</catalog_product_view>

but after that i do not see sidebar.phtml there

  • are use using a 2columns-left as template for the page? Otherwise the left column isn't used at all – Jeroen Mar 29 '15 at 13:15
3

You can restrict it to the product pages by entering the xml in the layout update section of each product (but that's wrong and time consuming) or you can add this in one of your layout xml files:

<catalog_product_view>
    <reference name="left">
      <block type="core/template" name="Designer Sidebar"  template="page/design/sidebar.phtml"/>
    </reference>
</catalog_product_view>
  • pls check my updated question – user1799722 Mar 23 '15 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.