I am trying to create a custom page for which I have the following XML using an empty template.
In my Controller, I have
public function indexAction()
{
$this->loadLayout();
$this->getLayout()->getBlock('root')->setTemplate('page/empty.phtml');
$this->renderLayout();
}
And in my layout, I have
<?xml version="1.0"?>
<layout version="0.1.0">
<brands_index_index>
<reference name="content">
<block type="catalog/layer_view" name="catalog.leftnav" before="brands" template="catalog/layer/view.phtml"/>
<block type="core/template" name="brands" template="brands/brands.phtml" />
</reference>
</brands_index_index>
</layout>
This works fine and the layered navigation is displayed.
However, I want the layered navigation to be displayed within the brands.phtml template. Thus, I tried to do the following:
<?xml version="1.0"?>
<layout version="0.1.0">
<brands_index_index>
<reference name="content">
<block type="core/template" name="brands" template="brands/brands.phtml" >
<block type="catalog/layer_view" name="catalog.leftnav" as="catalog.leftnav" template="catalog/layer/view.phtml"/>
</block>
</reference>
</brands_index_index>
</layout>
However, this does not seem to work when I call getChildHtml("catalog.leftnav") within brands.phtml.
How do I shift the layered navigation to where I need to call it in brands.phtml?
So, it seems like the block is loaded when I view the "rendered blocks" section in "Magento Debug".. However, no HTML is generated. Is there a rule that says that the layered navigation has to be in the left/content/right blocks or something?
THanks