Magento Forum - UK Magento Forum (Unofficial)

An unofficial but dedicated Magento Forum for Magento Users, Designers and Developers

How to find name of block

A forum to discuss Magento development and coding

How to find name of block

Postby raydona » Thu Jul 21, 2016 1:59 am

I have created my package based on "rwd" magento 1.9. When I click on a category, say, Women I go to page frontend/my_package/default/template/page/1column.phtml (template hints). In the middle of this page there is a block with template hint: frontend/base/default/template/catalog/category/view.phtml and Mage_Catalog_Block_Category_View. I want to place my module which has subcategories with images into this block. I just can't find the name of the block to insert into. In my layout file I want something like:

<catalog_category_view>
<reference name="????????">
<block type="women/subcategories" name="subcategoriesblock" as="subcategoriesblock" template="subcats/subcats.phtml"/>
</reference>
</catalog_category_view>

I have used $blocks = Mage::app()->getLayout()->getAllBlocks(); to get block names in current page and have tried and tested the various block names but nothing seems to work. Could somebody help and give some suggestion as to how I might get the name of the relevant block. All help will be greatly appreciated.
raydona
 
Posts: 5
Joined: Thu Jun 18, 2015 4:36 pm

Return to Magento Developers

cron