Hi all.

Sorry to ask such a simple question, but how do I change the heading/title of the contact page for the (core) contact module?

I assume I need to edit the contact.module file? If so, what do I change, because I tried to change a few places and it didn't work. (I ran update.php, but still nothing.)

If not, what are the (exact) steps?

I am new, so you may need to dumb things down a bit :)

I searched the forums and documentation and found nothing on how to do this.

Thanks in advanced.

Dan

Comments

nimazuk’s picture

you can change the header at this address:

domain.com/?q=admin/build/contact/settings
or this one for clean-urls
domain.com/admin/build/contact/settings

Is it what you wanted?

N.Mehrabany
niGraphic web design & photography

Nima

webdrips’s picture

Hi nimazuk

There is no place on that particular page to actually change the page title. I can only change "additional information" and "hourly threshold", but that's it.

I want to change the header/title from "contact" to something custom such that when the site loads domain.com/contact, the title is my custom one.

I assume the module itself needs to be changed, but I have no idea how.

Thanks,

Dan

Looking to Migrate from Drupal 6/7 to Drupal 10/11? Have a look at our Drupal 11 demo site and request access.

nimazuk’s picture

You can change the title of page by editing the contact menu in admin/build/menu
just input your title in appropriate field in "Edit menu item" form.

is it what you wanted?

N.Mehrabany
niGraphic web design & photography

Nima

webdrips’s picture

That was it...

Looking to Migrate from Drupal 6/7 to Drupal 10/11? Have a look at our Drupal 11 demo site and request access.

Anonymous’s picture

Thanks from me too! An odd effect for sure, but it works.

sumachaa’s picture

This doesnt seem to work for me.
I moved the menu item from the navigation menu to a custom menu I created (eg: footer menu).
There I changed the title of the menu. But still Im getting the old title for the contact page

eoto88’s picture

Thanks! It was so simple.

apsivam’s picture

Manually editing core files is not advisable. What do you want to change can you elaborate?

--
Cheers,
Sivanandhan, P. (a.k.a. apsivam)

uniteus’s picture

How do I change the subject and message labels on the Contact Module?

geodaniel’s picture

You could do that using the locale module, by creating a custom English language and changing those strings to whatever you wish. See http://drupal.org/node/24593 for more information.

xevious’s picture

.page-contact #h1title h1:after {
content: " Us";
}

SSP’s picture

Hello,
My CSS style sheet only has this when I search "Contact":

/*** contact ***/
#contact-mail-page { font-size:12px;}

This doesn't look like .page-contact #h1title h1:after {
content: " Us";
}

and I've tried all of the other suggestions above in order to change the header/title in the contact page but none have worked (it only lets me change the URL and page name, but not in the content of the page).

Thanks in advance for anyone's ideas/suggestions!
Catherine

David Xie’s picture

1. Go to admin/build/menu
2. Click on "Navigation"
3. Click on "edit" next to the menu item "Contact"
4. Edit the text field under "Menu link title:"
5. Click on "Save"

odedbobi’s picture

sorry, but my contact is not inside the navigation menu. i have moved it to the Primary links menu.
and once you follow your advice on the contact link, it doesnt more.
in addition, what if i want to have no title at all ? how can i do that ?

jcarlson34’s picture

This seems janky but you can leave the original contact menu item in the Navigation menu and disable it.

Rename the disabled menu item whatever you want, i.e. "Contact Us". Then go to the menu you want the contact form to be in and add a new link to /contact (or something else if you are using path aliases to redirect the link) and call it whatever you want, i.e. "Contact Us".

Contact will take its name from the disabled navigation menu item but you'll be able to have the menu link in the menu you want with the page title that you want (or add multiple links like having one in the header and one in the footer). Hope that helps!

mindfl10’s picture

The above solution is working for me if I want to change "Contact" to "Contact Us" But, how would you make it disappear? It requires text in the title box.

Tor Arne Thune’s picture

I found myself in the same situation, having moved the core-created Contact link from the Navigation menu to another menu. I didn't want to leave it disabled in the Navigation menu and create a new link, so I searched for another solution. In Drupal 7 (and probably Drupal 6) you can modify the title bar text and page title by adding this code to the template.php file of your theme (remembering to change 'mytheme' to the name of your theme):

/**
 * Implementation of hook_form_FORM_ID_alter()
 */
function mytheme_form_contact_site_form_alter(&$form, &$form_state) {
  drupal_set_title('Contact Us');
}

Never hack core files, as this will make it a headache to troubleshoot and upgrade your site.

pillarsdotnet’s picture

Good. — Fast. — Cheap.
(Pick any two.)

Anonymous’s picture

To remove the title of the contact page completely, I used this same function as follows:

function mysubtheme_form_contact_site_form_alter(&$form, &$form_state) {
drupal_set_title('');
}

I was concerned that a space would remain where the title had been but it did not. It worked like a charm.

amit.sharma’s picture

Thanks! This solution worked for me.

david_p’s picture

Great, it works very well. Thank you!

jaspm2004’s picture

that worked for me! thx...

jaspm2004’s picture

that solution worked for me....nice!!! thanks

aftabktk’s picture

you can change head title in drupal 6.
1. login in drupal.
2.click on site Configuration--> site information
So edit the form and save it. your title will be changed as u enter.

kind Regards,
aftab