当用户在magento的结帐页面上时,我想从标题徽标中删除主页链接但是我无法找到其中的路径,因此我可以在local.xml文件中删除代码类似于以下
<checkout_onepage_index>
<reference name="header">
<action method="removeLinkByUrl">
<url helper="PATH TO MAIN LOGO URL" />
</action>
</reference>
</checkout_onepage_index>
答案 0 :(得分:0)
tadhg,您无法通过xml代码执行此操作。
你需要去app/design/frontent/your Package/your Template/template/page/html/header.phtml
此处您需要的条件是仅在结帐页面上跳过徽标。
<?php
$currentRoute=Mage::app()->getRequest()->getRouteName().'_'.Mage::app()->getRequest()->getControllerName().'_'.Mage::app()->getRequest()->getActionName();
if($currentRoute!='checkout_onepage_index'): ?>
<a class="logo" href="<?php echo $this->getUrl('') ?>">....
....
<a>
<?php endif; ?>
答案 1 :(得分:0)
只需从结帐页面取消设置标题并添加新标题。
<checkout_onepage_index>
<reference name="header">
<action method="unsetChildren"></action>
<action method="setTemplate"><template>checkout/header.phtml</template></action>
</reference>
</checkout_onepage_index>
希望这会有所帮助!!!!!!
答案 2 :(得分:0)
我找不到从一个页面删除链接的方法,所以在结帐页面我正在使用
替换我的标题<checkout_onepage_index>
<reference name="root">
<block type="page/html_header" name="header" as="header" template="page/html/header2.phtml"/>
</reference>
</checkout_onepage_index>
并在我的本地主题模板中,在页面/ html中创建“header2.phtml”,其中包含带徽标的标题文件,但删除了该链接(从“徽标”类中删除了href="<?php echo $this->getUrl('') ?>"
。)