سؤال

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>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top