我是Magento的新手,我在这方面与一位具有丰富配置/ CMS设计经验的网页设计师一起探讨。所以所有的布局xml东西对我来说都很陌生。我只是想添加“我的帐户”,“登录/注销”和“我的购物车”链接到页脚。如何通过Magento的page.xml调用页脚中的链接
This Magento论坛帖子描述了要使用哪些代码以及要复制和粘贴到哪些文件,但对于我的生活我无法弄清楚在page.xml中的确切位置我应该使用各种addLink xml代码来获取它在我的页脚展示。
下面是我的帐户和登录/注销链接的XML,从customer.xml:
<!--
Default layout, loads most of the pages
-->
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
</reference>
</default>
<!--
Load this update on every page when customer is logged in
-->
<customer_logged_in>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
</reference>
</customer_logged_in>
<!--
Load this update on every page when customer is logged out
-->
<customer_logged_out>
<!---<reference name="right">
<block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
</reference>-->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
</reference>
<remove name="reorder"></remove>
</customer_logged_out>
这里是page.xml的XML在论坛上发帖说,它应该去,并在我不完全确定是否需要去什么线:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
<label>Page Footer</label>
<action method="setElementClass"><value>bottom-container</value></action>
</block>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
</block>
这里是从footer.phtml,其中的联系应该结束了标记:
<div class="four columns">
<?php echo $this->getChildHtml() ?>
</div>
我也困难地围绕如何getChildHtml,它在页脚链接拉,知道如何获得这些链接。
任何帮助将大规模赞赏!我很兴奋地谈到Magento的强大功能,它让我想起我如何在一个任务上花费几个小时,就像添加链接到页脚一样简单。