Magento – How to load a custom .phtml file in left sidebar in page/2columns-left.phtml

layoutphtmltemplate

I'm fairly new to Magento (1) and was wondering how I can add a small template file (containing Clerk search filters) to the top of the left sidebar within the 2columns-left template for a specific page.
I've got it to show up on the correct page, but it just overlaps with everything.

This is the code:

<?xml version="1.0"?>
<layout version="0.1.0">
    <catalogsearch_result_index>
        <reference name="left">
            <block type="core/template" name="filters" output="toHtml" template="clerk/filters.phtml"/>
        </reference>
    </catalogsearch_result_index>
</layout>

This is not a custom block, nor do I think it is necessary to create one (or is it best I do?), just to show the filters. But how can I render this at the top of the left bar, before any other content and make it not overlap with the rest of the content within the left sidebar?

Many thanks

Best Answer

Use a local.xml file approach. You can create your own template phtml file in page/html.File name filters.phtml

Call this file in your local.xml file.

<reference name="left">
<block type="core/template" name="filters" template="page/html/filters.phtml"/>
</reference>

I suggest this links for your reading

Related Topic