I have done a website in magento. In that website, I have contact page. I have inserted the keywords,description in the contact page But when I am giving the title, it is not showing in the website. Why is it like that ?
2 Answers
add contacts.xml
to your theme at
app/design/frontend/Your-Namespace/Your-Theme/layout/contacts.xml
change lable in below code
<contacts_index_index translate="label">
<label>Contact Us Form</label>
<reference name="head">
<action method="setTitle" translate="title" module="contacts"><title>Add your label here</title></action>
</reference>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</reference>
<reference name="content">
<block type="core/template" name="contactForm" template="contacts/form.phtml"/>
</reference>
</contacts_index_index>
Also you can add above code in local.xml
of your theme.
On your
FTP/cPanel
server in the folder where the Magento files are stored, go to\app\design\frontend\default\theme_number\layout\contacts.xml
orapp/design/frontend/tm_themes/theme_number/layout/contacts.xml
in newer templates.If you do not see the
contacts.xml
file in the theme folder, you should copy it fromapp\design\frontend\base\default\layout
to the theme folder.
Open it with any code editor and change the name of the page around line 38:
<reference name="head">
<action method="setTitle" translate="title" module="contacts"><title><strong>Contact Us</strong></title></action>
</reference>
3. Save the changes, remove the cache and refresh the page.
-
Hi..I tried all these..I want to know from where the title Contact Us is coming...So edit there.– lenaNov 22, 2016 at 10:17
-
It will come from contacts.xml as i mentioned, you can change it in specific theme if you have. Nov 22, 2016 at 10:21
-
I tried to change it in the theme...but it is not reflecting in the frontend...– lenaNov 22, 2016 at 10:22
-
Assume you are using same theme and there is no overrides for contacts module by custom extension, Remove the cache and try again. it will definitely work. Nov 22, 2016 at 10:27
-
No..I tried to comment all the title code in the xml files..but it is not reflecting in the front side..– lenaNov 22, 2016 at 10:34