I want to add a custom block to the category pages and not care if the the category is anchor or not or if it has children or not.
I want to add that block at the bottom of the page after the product list or static block.
So I added this in the layout file
<catalog_category_view>
<reference name="content">
<block type="some/block" tempalate="some/template.phtml" after="-" /><!-- notice the "after" attribute -->
</reference>
</catalog_category_view>
the block appears in every category page but at the top of the page.
If I change the layout handle to catalog_category_default
or catalog_category_layered
everything works OK and I see my block at the bottom of the page.
Any idea why "after" is ignored for catalog_category_view
handle?
Note: Using the default magento theme
content
block ofcatalog_category_view
is rendered after your block.catalog_catagory_view
layout handle before.after="-"
on other blocks in all the category page layout handles. As for the layout handle namecatalog_category_view
is the default one generated for all the pages through$this->addActionLayoutHandles();
catalog_catagory_view
but I have done via code but via xml code. good questions.<update handle="my_handle" />
insidecatalog_category_default
andcatalog_category_layered
. But I'm just curious to why this doesn't work.