默认情况下,非 cms 页面具有与网站本身相同的标题,并且我有一个 seomoz 帐户,该帐户报告我有 2 个具有相同标题的页面
http://www.theprinterdepo.com/contacts/ http://www.theprinterdepo.com/customer/account/forgotpassword/
我确实需要更改这两个页面的标题,在 Magento 中有点复杂,因为我认为它在某些 XML 文件上。
问题是我不知道在哪一个。
我创建了这个文件: /home/theprint/public_html/app/design/frontend/default/MAG060062/layout/local.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="head">
<action method="setTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
</contacts_index_index>
<customer_account_forgotpassword translate="label">
<reference name="head">
<action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
</reference>
</customer_account_forgotpassword>
</layout>
</xml>
但是它不起作用
谢谢
最佳答案
在你的app/design/frontend/[interface]/[theme]/layout/local.xml中,添加:
<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="head">
<action method="setTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
</contacts_index_index>
<customer_account_forgotpassword translate="label">
<reference name="head">
<action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
</reference>
</customer_account_forgotpassword>
关于magento - 重复标题,Magento 忘记密码页面标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8573117/