0

i've the following code in themename/template/catalog/product/view.phtml

<div class="product-collateral">
    <?php echo $this->getChildHtml('info_tabs') ?>
    <?php echo $this->getChildHtml('additional_info'); ?>
    <?php echo $this->getChildHtml('product_additional_data') ?>
</div>
    <?php echo $this->getChildHtml('related_products') ?>
    <?php echo $this->getChildHtml('upsell_products') ?>

i move above code in themename/template/page/html/footer.phtml, but it displays nothing, anyone know what are the problems?

1

The problem is that you cannot simply move this around in the .phtml files, because of dependencies.

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

means that your template tries to render the block with the name "info_tabs" which exists for the product view page, but probably not for your footer block.

To move all this content, you will need to update your layout as well (e.g. use a local.xml file in your theme).

EDIT: See here for an introduction of how layout / blocks and template interact: http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-4-magento-layouts-blocks-and-templates

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.