如何解决?我希望"我的购物车"链接不在顶级菜单中,而是在其他地方.所以我从checkout.xml中删除了:
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCheckoutLink"></action>
</block>
</reference>
Run Code Online (Sandbox Code Playgroud)
然后添加新的参考:
<reference name="top.mybasket">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
</block>
</reference>
Run Code Online (Sandbox Code Playgroud)
从page.xml我添加:
<block type="page/html_header" name="header" as="header">
<block type="page/template_links" name="top.links" as="topLinks"/>
// other blocks
<block type="page/template_links" name="top.mybasket" as="my_basket_count"/>
</block>
Run Code Online (Sandbox Code Playgroud)
接下来我添加header.phtml:
<?php echo $this->getChildHtml('my_basket_count') ?>
Run Code Online (Sandbox Code Playgroud)
一切正常. 我的问题是如何在local.xml中完成整个过程?我试过但它看起来很关键!
magento ×1