0
votes

I want to move content from a custom module into its own tab on the product detail pages. I already have tabs working, but I want to create a new tab and move this content into its own tab with a custom title. This is copied from a module's XML file:

<catalog_product_view>
    <reference name="content">
        <reference name="product.info">
            <reference name="product.info.additional">
                <block module="productattachments" type="productattachments/productattachments" name="product.info.productattachments_additional" as="productattachments_additional" template="productattachments/productattachments_additionalblock.phtml">
                    <block name="attachments" as="attachments" type="productattachments/productattachments" template="productattachments/items/attachments.phtml"/>
                </block>
            </reference>
        </reference>
    </reference>
</catalog_product_view>

Any ideas on how to accomplish this? I've tried different approaches with addTab action, but none working as expected. It's most likely that I don't know how to place it.

Thank you for your time and help!

1
can you provide the screenshot on which tabs you are taking about. you mean the default tabs like product description and specifications or some other tabs that you are mentionoing!!!Pavan Kumar
Thank you for answering! I mean the default product tabs placed on product view page. Sorry if that was unclear. :)Magnus Alexander

1 Answers

2
votes

You may try to use the code below (I've used the values of attributes 'type', 'name', 'as', 'template' from your example):

<catalog_product_view translate="label">
    <reference name="product.info">
        <block type="productattachments/productattachments" name="product.info.productattachments_additional" as="productattachments_additional" template="productattachments/productattachments_additionalblock.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Custom Title</value></action>
        </block>
    </reference>
</catalog_product_view>