Local.xml Footer – Create Full-Width Block Before Footer on 2 Columns Left Page

footerlocal.xml

I would like to put a full-width block just before my footer on my search results page (<catalogsearch_result_index>) using my local.xml file, but I can't seem to figure out how to do it.

I have a block I made as a core/template type that is working on other pages. It is a carousel with products in it. When I add it to the search results page, it shows up on the right side, not taking up the full width because it is a 2columns-left page.

I could add the block inside the footer itself at the top (which I have also had trouble accomplishing), but this would not be ideal since the background color for the footer differs from the block.

So, do you know of any way I can accomplish what I am trying to do?

Thank you.

Best Answer

If you edit

{magento_root}/app/design/frontend/{custom_package}/{custom_theme}/template/page/2columns-left.phtml

And just after the left column you add

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

Then in your local.xml

<catalogsearch_result_index>
    <reference name="root">
     <block type="core/template" name="full_width" as="full_width" template="path/to/template.phtml" />
    </reference>
</catalogsearch_result_index>

Where template="path/to/template.phtml" is the path to your template file. For instance if you added the template to the same folder as the 2columns-left.phtml then the template value would be template="page/full_width_static_block.phtml"