1

我正在尝试在 magento 网站的页脚中找到链接,但我很难找到 phtml 文件。我在 page.xml 文件中找到了块代码

<block type="page/template_links" name="footer_links" as="footer_links" after="footer.newsletter" template="page/template/links.phtml"/>

但我找不到文件 links.phtml 文件,我检查了当前模板

website/app/design/frontend/website.com/default/template/page/

但我在那里看不到任何模板文件夹。

任何人都可以帮我解决这个问题,如何找到文件,我什至尝试打开模板路径提示它没有帮助。提前感谢您的帮助。

4

3 回答 3

2

可能会造成混淆,我 Magento 的页脚链接是通过以下两种方式之一生成的:

1)通过 XML 布局添加,这是添加站点地图链接等的方式,例如:

联系人.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>

您可以添加更多这样的内容,或注释掉以删除每个链接

它们是使用在下面的配置中启用的标准模板文件 (template/page/template/links.phtml) 生成的。上面的每个链接定义(在不同的 xml 配置中有多个)将使用下面的模板来显示实际的 HTML 链接。

页面.xml

<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
     <!-- uncomment this to ditech them.. -->
     <block type="page/template_links" 
            name="footer_links" as="footer_links" 
            template="page/template/links.phtml" />
 </block>

2)你会发现一个名为footer_links的静态块,其中还包含一些链接,这是为了让你更容易添加自己的链接。它们在内部启用

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>

这两种方法都用于生成可能令人困惑的页脚链接:)

于 2013-02-19T09:38:53.717 回答
0

试试这个路径:

/app/design/frontend/base/default/template/page/template

希望对你有帮助...

于 2013-02-18T23:16:16.007 回答
0

要从页脚链接中删除“订单和退货”,我必须从 sales.xml 文件中注释掉该块

  <!-- <default>
       <reference name = "footer_links">
       <block type="sales/guest_links" name="return_link"/>
       <action method="addlinkBlock">
       <blockName>return_link</blockName>
       </action>
       </reference>
       </default>
   -->
于 2013-02-20T16:36:25.210 回答