0

I know : we can update a layout of a view in magento by using its layout handle for example "http://domain.com/shops/index.php/customer/account/index/" it has a layout handle like by using this in local.xml we can update layout of that particular view like removing the cart sidebar as follows

<layout version="0.1.0">
   <customer_account_index>
    <remove name="cart_sidebar"/>
  </customer_account_index>
</layout>

And what i want to know is, i created a menu items fall like men->Tshirts and it goes to the url like "http://domain.com/shops/index.php/men/t-shirts.html", how can i remove the cart sidebar from this page?

4

2 回答 2

5

您有类别的一般布局catalog_category_view,但 Magento 还为类别加载特定布局句柄,<CATEGORY_{ID_HERE}>因此您可以使用例如<CATEGORY_5>您还可以在设计选项卡下的类别编辑页面中指定自定义布局代码。您还可以通过编辑它们来设置它的孩子来继承它。

于 2013-10-07T17:58:25.197 回答
4

在类别页面上,Magento 触发的句柄(按顺序)是

  1. 完整的动作名称处理程序catalog_category_view

  2. 一个特殊的catalog_category_layered处理程序

  3. 一个特殊的CATEGORY_[ID]处理程序(其中 ID 是一个类别 ID,例如CATEGORY_8

那应该给你你所追求的。

如果您使用的是Commerce Bug(我创建的商业 Magento 调试扩展并尽量不要过度宣传),您可以从Layout选项卡中获取此信息

在此处输入图像描述

于 2013-10-07T19:37:51.643 回答