Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Change Title of Contact Us,Site Map and Search Terms Pages
 
Shashank
Jr. Member
 
Total Posts:  8
Joined:  2008-08-13
 

How to change title of Contact Us,Site Map and Search Terms pages?

We can set title for the pages which can be created from the Admin/backend. We can also change the the Magento’s default title comming on other pages. But how can we set Title for each page in the customised manner.  Like for “Home page” title is “home” and for “About Us” page there is title “About Us”. These pages can be created and changed from the admin side. But what for the pages which are already created but there is no way to change through the Admin Side like Contact Us,Site Map and Search Terms Pages.

How can we set customised titles for these pages like for “Contact Us” page title should be “Contact Us”, “Site Map” page the Title should be “Site Map” and “Search Terms” Page the Title should be “Search Terms”. How can we change the Title of these pages?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Madin
Jr. Member
 
Total Posts:  9
Joined:  2008-08-01
Germany
 

I was able to figure it out for the ‘Sitemap’-page.
Add this line in magento\app\code\core\Mage\Catalog\Block\Seo\Sitemap\Category.php:
$this->getLayout()->getBlock(’head’)->setTitle(’Your Title‘);

protected function _prepareLayout()
    
{
        $helper 
Mage::helper('catalog/category');
        
        
$this->getLayout()->getBlock('head')->setTitle('Your Title');
...
}

I haven’t looked for the location of the other pages but it should be similar.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shashank
Jr. Member
 
Total Posts:  8
Joined:  2008-08-13
 

Thanks Madin. It worked. Great!

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

Seems like some of them are specified in the xml layout files. You shouldn’t have to change core code to change the title.

 
Magento Community Magento Community
Magento Community
Magento Community
 
viditech
Jr. Member
 
Total Posts:  7
Joined:  2008-08-27
 

I was able to change the default page title for all pages not in the CMS by editing this file:

app/code/core/Mage/Page/etc/config.xml

Be sure to refresh cache in Cache Management after the change.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chefshamy
Jr. Member
 
Total Posts:  6
Joined:  2008-09-02
 

I am trying to find simply where to change the content on the Contact Us page, since it is not in the CMS - static pages or the footer block.

anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

Look in the email templates!  I was amazed to find it there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
3rdRock
Member
 
Total Posts:  47
Joined:  2008-09-08
 

You should be able to make changes to the title and the likes through the xml, but as that does not seem to be the case for at least 1.1.6
$MAGENTODIR/app/design/frontend/*YOURTEMPLATE*/*THEME*/layout/contacts.xml

You can make changes to the actual body content here:
$MAGENTODIR/app/design/frontend/*YOURTEMPLATE*/*THEME*/template/contacts

 
Magento Community Magento Community
Magento Community
Magento Community
 
steeffie
Jr. Member
 
Total Posts:  8
Joined:  2008-09-26
 

Check http://www.lotusseedsdesign.com/blog/contact-us-title

 
Magento Community Magento Community
Magento Community
Magento Community
 
KWAVE
Member
 
Avatar
Total Posts:  53
Joined:  2009-04-04
Boston
 

You can change the titles for contact us, sitemaps pages by going to Admin>General>Design> then into HTML Head

You can change title, keywords and description.

I am still trying to find how to change my account pages and stuff like that though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
horninc
Jr. Member
 
Total Posts:  15
Joined:  2009-03-09
 

Ty, help me a lot smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Charles Albert
Member
 
Total Posts:  56
Joined:  2008-06-24
 

I’ve came to this post to a similar problem: to define the title of my custom module. The content of this topic didn’t solved my problem, but helped me to figure it out.
Thanks!
To anyone that came here searching for this resolution, here’s the solution:
In your controller, method indexAction (or any other desired method), insert this piece of code:
$this->getLayout()->getBlock(’head’)->setTitle($this->__(’My New Page Title Goes Here!’));

Hope this helps anyone.
Thanks again!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jazkat
Sr. Member
 
Total Posts:  154
Joined:  2009-07-09
 

Thanks to steeffie I found that link useful.

Just for those who don’t have only english language,
also add translation module:

For Contact US:

<reference name="head">
    <
action method="setTitle" translate="title" module="contacts"><title>Contact Us</title></action>
</
reference>

module="contacts" is a Mage_Contacts.csv file.

It’s just a shame we need to change these things that take so much time and yet come with Magento by default..
Especially if there is need for different languages.. Too much time consuming...!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
enjoysunglasses
Jr. Member
 
Total Posts:  6
Joined:  2010-10-04
 
Madin - 25 August 2008 03:06 AM

I was able to figure it out for the ‘Sitemap’-page.
Add this line in magento\app\code\core\Mage\Catalog\Block\Seo\Sitemap\Category.php:
$this->getLayout()->getBlock(’head’)->setTitle(’Your Title‘);

protected function _prepareLayout()
    
{
        $helper 
Mage::helper('catalog/category');
        
        
$this->getLayout()->getBlock('head')->setTitle('Your Title');
...
}

I haven’t looked for the location of the other pages but it should be similar.

Thanks it works well for the product page SITEMAP also:

\app\code\core\Mage\Catalog\Block\Seo\Sitemap\product.php:

protected function _prepareLayout()
    
{
        $collection 
Mage::getModel('catalog/product')->getCollection();
        
        
$this->getLayout()->getBlock('head')->setTitle('Your Title');
...
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
enjoysunglasses
Jr. Member
 
Total Posts:  6
Joined:  2010-10-04
 

You can change the sitemap title page in the frontend layout:
app/design/frontend/default/enjoy/layout/catalog.xml

<catalog_seo_sitemap_category>
        <
update handle="catalog_seo_sitemap" />
        <
reference name="seo.sitemap.container">
            <
action method="setTitle" translate="title" module="catalog">
                <
title>YOUR TITLE</title>
            </
action>

<catalog_seo_sitemap_product>
        <
update handle="catalog_seo_sitemap" />
        <
reference name="seo.sitemap.container">
            <
action method="setTitle" translate="title" module="catalog">
                <
title>YOUR TITLE</title>
 
Magento Community Magento Community
Magento Community
Magento Community
 
cleanline
Jr. Member
 
Total Posts:  21
Joined:  2009-10-29
 

Here is how to change the title of the Popular Search Term page.

File: app/code/core/Mage/CatalogSearch/conrtollers/TermController.php

public function popularAction()
    
{
        $this
->loadLayout();
        
$this->getLayout()->getBlock('head')->setTitle('Popular Search Terms');
        
$this->renderLayout();
    
}

I believe when most of us say Titles we are actually talking about the title of the page not the titles on the page hmmm

Hope this helps someone...there must be a better way...I hate editing core files.  I normally make a local file but for some reason the controller files won’t work as local.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2