修改MAGENTO的页脚的版权

要修改MAGENTO的页脚,我们必须改动两个地方。
一个是MAGENTO?? ?自己创建的,在ADMIN可以修改(CMS > Static Block).

另外一部分是以.phtml / .php / .xml 格式文件存于设计文件夹中。

XML文件位置:
app/design/frontendlayout/page.xml

你将找到关于页脚的代码:
<block type=”page/html_footer” name=”footer” as=”footer” template=”page/html/footer.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>

另外XML文件位置:
app/design/frontendlayout/cms.xml

你将找到关于页脚的代码:
<reference name=”footer”>
<block type=”cms/block” name=”cms_footer_links” before=”footer_links”>
<!–
The content of this block is taken from the database by its block_id.
You can manage it in admin CMS -> Static Blocks
–>
<action method=”setBlockId”><block_id>footer_links</block_id></action>
</block>
</reference>

你可以看到PAGE.XML调用页脚文件,是通过文件:
app/design/frontendtemplate/page/html/footer.phtml
这个文件包含了一个方法去调用些子HTML文件($this->getChildHtml();)
app/design/frontendtemplate/page/switch.phtml
app/design/frontendtemplate/page/template/links.phtml
一个重要的关于页脚的子HTML文件是:
结尾为 .phtml的文件 , 在BLOCK.PHP文件中可以找到 “$this->getLinks()” 这个方法,这个方法控制了模板的脚本调用。
所控制的模板对应位置在:
app/code/core/mage/page/Template/Links.php

但是,我们可以发现,这儿只能找到一部分的页脚链接,其他的在哪儿呢?
<!–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>

<!–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>

<!–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>

<!–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>

你可以任意修改,删除这四个.xml 或者创建新的。
到目前为止,我们已经知道了所有的页脚文件,如我开头所说的,其他页脚文件都在Admin > CMS > Static Blocks里面。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值