1

Well in my page I have in the left bar show the sub categories of the category when you enter the page of the category, but my client has required that I manage to put a second left bar below the first one, this has to show the brands of the products of the category; I have the sub category of brands, but I have no clue of how to put them as a second bar in the left side of the page.

I hope you guys can help me. Thanks in advantage.

1 Answer 1

0

To add a new block into left, you need a module, a layout xml, a block and a template.

Add Layout file to magento

<config>
    <frontend>
        <layout>
            <updates>
                <company_module>
                    <file>company_module.xml</file>
                </company_module>
            </updates>
        </layout>
    </frontend>
</config>

Add block to left

<the_layout_handle_of_your_choice>
    <reference name="left">
        <block type="your/type" template="your/module/template.phtml" />
    </reference>
</the_layout_handle_of_your_choice>

If you don't need a block to split logic and html, you can just use core/template here.

And in your template file you can show whatever you want:

<?php $brands = $this->getMyBrands(); ?>
<?php foreach($brands as $brand): ?>
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.