| 
 要修改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里面 
 
 (责任编辑:最模板) | 



 一元云购系统源码带手机
							人气:6204
							一元云购系统源码带手机
							人气:6204
						 大气asp科技安防电子公司
							人气:738
							大气asp科技安防电子公司
							人气:738
						 火红大气模板之shopex免费
							人气:3884
							火红大气模板之shopex免费
							人气:3884
						 Prestashop外贸数码电子商城
							人气:263
							Prestashop外贸数码电子商城
							人气:263
						 shopex手机数码商城模板
							人气:870
							shopex手机数码商城模板
							人气:870
						 ecshop台湾地区分区信息
							人气:1162
							ecshop台湾地区分区信息
							人气:1162