Hi there, thanks for such a great framework!
I have created a custom way of displaying categories in my site’s home page, and as a result I created a template file inside category/navigation/ which iterates through all categories and displays them according to my needs.
I then went ahead and modified page.xml in my “modern theme” layouts and added the following line inside the ‘content’ structural block:
<block type="core/text_list" name="content" as="content">
<block type="catalog/navigation" name="contentmenu" as="contentmenu" template="catalog/navigation/contentmenu.phtml" />
Finally I went to sample\home.phtml and added a $this->getChildHtml(’contentmenu’) to display the categories in this sample homepage.
So far so good? My problem is that given the categories template was declared as a child for “content” which is a structural block, it appears in every single page that makes use of the content block.
I have found a way of “unsetting” a certain content block from within other xml files - meaning that I would have to go to category.xml and every other xml which displays the categories and unset the ‘contentmenu’ block.
Is there a better way? Is there an xml file specifically for the home page where I can reference the content structural block and add a child right there?
This looks like an ugly workaround that I’m not really comfortable with I simply want the categories to be displayed in the main page. If I add all the php code in home.phtml then I’m not in the corresponding namespace to access the categories.
Thanks for your help!