Magento顶、底部链接的修改

一、Magento顶部链接的修改:在页面Account增加一个top.link,只需在layout的xml文件reference top.lik

        <reference name="top.links">
            <action method="addLink" translate="label title" module="personal">
                <label>My Homepage</label>
                <url helper="personal/getUserUrl"/>
                <title>My Homepage</title>
                <prepare/>
                <urlParams/>
                <position>15</position>
            </action>
        </reference>

注:<url .../>需要在某个module的helper类,定义好getUserUrl()这个方法,返回一个url。

二、Magento底部链接的修改:

1、关于我们和客户服务(About Us | Customer Service)

这两个链接主要由 cms.xml 文件进行调用。

修改这两个链接的URL你可以去magento管理后台CMS=> Static Blocks =>Footer Links

<li><a href=”{{store direct_url=”about-us”}}”>About Us</a></li>
<li><a href=”{{store direct_url=”customer-service”}}”>Customer Service</a></li>

修改其内容你需打开magento后台CMS => Pages ,然后找到 About Us 和Customer Service 的CMS页,打开进行编辑。

2、网站地图(Site Map)

magento 的sitemap是由catalog.xml 文件进行调用的。

<reference name=”footer_links”>
<action method=”addLink” translate=”label title” module=”catalog” ifconfig=”catalog/seo/site_map”><label>Site Map</label><url helper=”catalog/map/getCategoryUrl” /><title>Site Map</title></action>
</reference>

3、搜索条目和高级搜索(Search Terms | Advanced Search)

这两个是由catalogsearch.xml 文件控制的

<reference name=”footer_links”>
<action method=”addLink” translate=”label title” module=”catalogsearch” ifconfig=”catalog/seo/search_terms”>
<label>Search Terms</label>
<url helper=”catalogsearch/getSearchTermUrl” />
<title>Search Terms</title>
</action>
<action method=”addLink” translate=”label title” module=”catalogsearch”>
<label>Advanced Search</label>
<url helper=”catalogsearch/getAdvancedSearchUrl” />
<title>Advanced Search</title>
</action>
</reference>

4、联系我们(Contact Us)

magento 的contact us 可修改contacts.xml 文件

<reference name=”footer_links”>
<action method=”addLink” translate=”label title” module=”contacts” ifconfig=”contacts/contacts/enabled”><label>Contact Us</label><url>contacts</url><title>Contact Us</title><prepare>true</prepare></action>
</reference>

5、RSS

找到 rss.xml文件

<reference name=”footer_links”>
<action method=”addLink” translate=”label title” module=”rss” ifconfig=”rss/config/active”><label>RSS</label><url>rss</url><title>RSS testing</title><prepare>true</prepare><urlParams/><position/><li/>
<a>class=”link-feed”</a>
</action>
</reference>

6、修改magento底部默认的message

Report All Bugs (ver. 1.2.1.2)© 2008 Magento Demo Store. All Rights Reserved

找到/app/design/frontend/default/default/template/page/html/footer.phtml 文件进行编辑。

7、修改copyright notice

也是修改footer.phtml文件
/app/design/frontend/default/default/template/page/html/footer.phtml





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值