Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Unset callout in category view
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

i want to disable the left callout used on home for the category view only, i allready tested

<!--
Category default layout
-->

    <
catalog_category_default>
        <
reference name="left">
            <
action method="unsetChild"><alias>left.permanent.callout</alias></action>
            <
block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
           </
reference>
        <
reference name="content">
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
            <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml" />
            </
block>
        </
reference>
    </
catalog_category_default>

without success. Any hints?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

any help would be helpful smilesmile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

unsetBlock is used for child blocks with as="child_name" attribute.

The specific block you’re trying to remove does not have assigned child name, so it needs to be removed by global block name.
To remove block by name use <remove name="block_name"/>

In your example it would be:

...
    <
catalog_category_default>
          <
remove name="left.permanent.callout" />
          <
reference name="left">
            <
block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
           </
reference>
        <
reference name="content">
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml" />
            </
block>
        </
reference>
    </
catalog_category_default>
 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

@moshe - thanks for this detailed explanation, very helpful! You’re offering a great support in this forum, i am going to fall in love with magento kiss

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

I’m sorry, it doesn’t work in my case smile (cache is deactivated)

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

Still out there moshe?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

I’ve noticed that remove.block only works in categories that aren’t anchors…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

Ok, solved. Thanks to Stefan/m-zentrale!

<catalog_category_default>
          <
reference name="left">
           <
remove name="left.permanent.callout" />
            <
block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
           </
reference>
        <
reference name="content">
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml" />
            </
block>
        </
reference>
    </
catalog_category_default>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top