0

I have a line of PHP that will determine where product videos appear on my site. I would like for them to display in the product description tab, or possible in a custom Tab that I make, how would I do this as putting the php directly into the text field for that attribute doesn't work, and I can't find a place to drop this in the template files. this is the php

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

Thanks for the help

1

Using a layout xml file in a module or simply the local.xml in your theme you can simply update the template used for the description block and add a new child block of the type of your video view. Then in your new template you can add this code that you have mentioned in your question.

To change the template and add a child block the following snippet should work:

<catalog_product_view>
    <reference name="product.description">
        <action method="setTemplate">
            <template>path/to/your/template.phtml</template>
        </action>
        <block type="your/view_block" name="video_view" template="your/video/template.phtml" />
    </reference>
</catalog_product_view>

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.