In this line of code:
<body <?php echo $this->getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
Where is the BodyClass() variable changed?
I discovered you can add this in the XML. For example, to add ‘customer’ class to every page in the customer area.
In customer.xml add
<action method="addBodyClass"><className>customer</className></action>
...
本文介绍如何在 Magento 中通过 XML 配置文件为页面 body 添加特定的 class,例如为所有客户区域页面添加 'customer' 类。此方法有助于前端样式定制及功能增强。
2423

被折叠的 条评论
为什么被折叠?



