Change page title via local.xml
-
02-10-2020 - |
سؤال
I have managed to change the title of the Register page with the following code in local.xml
<customer_account_create>
<reference name="head">
<action method="setTitle"><title>Create New Customer Account - Bomber Jacket</title></action>
</reference>
</customer_account_create>
How can I do something similar for a page like www.example.com/about-us.html ?
المحلول
Unfortunately, Magento does not support page specific handles for CMS pages.
You can only change title for all CMS pages via local.xml
which is not what you want.
I suggest you use the backend when editing the CMS page you can add the following code to the Layout Update XML section:
<reference name="head">
<action method="setTitle"><title>New Title</title></action>
</reference>
But I'm pretty sure you don't have to use XML and you can do that by changing the name of the CMS page.
نصائح أخرى
I guess that the URL specified is CMS page. In that case you can set the XML instructions in the CMS page itself, in: Design -> Layout Update XML:
<reference name="head">
<action method="setTitle"><title>About My shop</title></action>
</reference>
لا تنتمي إلى magento.stackexchange