1

I want to add my phtml between description.phtml and attributes.phtml using custom module

my xml file

<?xml version="1.0"?>
<layout>
    <catalog_product_view translate="label">
        <reference name="content">
            <block type="example/product_view_detail" name="example_detail">
                <action method="setTemplate"><template>example/catalog/product/view/detail.phtml</template></action>
            </block> 
        </reference>
    </catalog_product_view>
</layout>

how to add this phtml in view.phtml?

enter image description here

6
  • <?php echo getChildHtml('example_detail'); ?> Mar 11, 2015 at 12:48
  • in which file add this code?
    – ND17
    Mar 11, 2015 at 12:53
  • 1
    Err. The one you asked what to add to view.phtml... :/
    – zigojacko
    Mar 11, 2015 at 13:54
  • @zigojacko check my update
    – ND17
    Mar 11, 2015 at 14:04
  • You can still add to that section in view.phtml although you don't need to add anything to the template files, you can just insert it into the appropriate section from your XML.
    – zigojacko
    Mar 11, 2015 at 14:09

1 Answer 1

1

That only change in xml file

Replace this

<reference name="product.info">

with

<reference name="content">

Add this content in reference tag

<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="setTitle" translate="value"><value>Information</value></action>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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