问题是,我只在Magento的主页上显示徽标,检查它是否与getIsHomepage();主页一致。现在我想要做的事情是只在仪表板页面的标题内显示徽标,你知道getIsHomepage的替代方案,但要检查它是否是我的账户页面吗?获取当前页面 - Magento
感谢
问题是,我只在Magento的主页上显示徽标,检查它是否与getIsHomepage();主页一致。现在我想要做的事情是只在仪表板页面的标题内显示徽标,你知道getIsHomepage的替代方案,但要检查它是否是我的账户页面吗?获取当前页面 - Magento
感谢
最好的做法是使用xml来完成此操作d解析url。添加到您的local.xml中:
<customer_account_index>
<reference name="header">
<action method="setTemplate"><template>page/html/customer_account_header.phtml</template></action>
</reference>
</customer_account_index>
复制和编辑header.phtml文件template/page/html/customer_account_header.phtml
如果你想出去客户账户页面逻辑则
首先读取当前路由器和控制器和行动headere.phtml
逻辑就像是 为Magento的客户dasboard页面网址是客户/帐户/索引
then
<?php $action = Mage::app()->getFrontController()->getAction();
echo $action->getFullActionName('_');
if($action->getFullActionName('_')=="customer_account_index")
{
}
?>
你的管理工作>仪表盘雅客户账户? –
我正在谈论前端的客户账户 –