jc70
jc70

Reputation: 247

Creating a custom contact page -- page-contact.tpl.php

I'm new to Drupal. I want to create a contact page, so I copied page.tpl.php and renamed it to page-contact.tpl.php. I created some new elements in the page, so I can see that if I click on the "contact" link, I'll know that I went to the correct page.

Right now I don't see any change. Was there something I missed? Do I need to do something in the admin settings so Drupal knows which file I need to open?

I also tried clearing my cache.

Upvotes: 0

Views: 5129

Answers (3)

Dave Reid
Dave Reid

Reputation: 1270

Drupal core's built in contact module does not use any templates, so you'll have to use something like Webform if you want a per-contact template.

Upvotes: 1

brian_d
brian_d

Reputation: 11360

When you say cleared my cache do you mean the browser cache or drupal's cache? Ensure drupal's theme registry has been cleared by going to /admin/build/themes, or logging out and back in.

I also recommend trying the webform module as mingos suggests.

Upvotes: 2

mingos
mingos

Reputation: 24502

In theory, this is a valid approach. Problem is, you'll be able to create a new layout for your contact page this way, but not necessarily change the contact form. If you wish to alter the form as well, I'd recommend using the webform module. It's pretty flexible when it comes to creating contact forms, plus, it creates a node, so you can style it with ease (either in you standard node.tpl.php or - even better - in node-webform.tpl.php). This is what I usually do.

There might be other solutions too, but it would help if you made it clear what kind of alterations you wish to introduce in your contact page.

Upvotes: 4

Related Questions