By gdoteof on
am I going about this wrong? all I need to do is add a bit of text under the site wide contact form which exists at mysite.com/contact
so, i copied page.tpl.php to page-contact.tpl.php (as per the developer module theme developer) and uploaded it, cleared the cache, and its not loading page-contact.tpl.php its still sticking with page.tpl.php
am i doing something silly?
Comments
bah
its working exactly as expected. i don't know what i did to trigger it to finally show up
=-=
I believe you have to clear the theme registry before new tpl.php files are made available. This can be done by visiting administer -> themes or manually. The devel.module may even offer some help here.
Beginner Help
I'm new to php and was hoping someone could talk me through how this is done. I also just need to add text underneath the form. I've been scouring the web to no avail, and neither of the drupal books I have are much help.
So I copy page.tpl.php to page-contact.tpl.php - then what?
Thanks in advance.
=-=
then upload it to your theme folder
and visit administer -> themes
check site for functionality you expect.
Hi, A different method would
Hi,
A different method would be to theme the contact form not the whole page.
Here's how i'd do it, add this to your template.php file:
Or simpler than that why not add a block with the text in the "content" region?
Worked for me on a test site.
Cheers
Tom
______________________________________________
http://drupalsn.com/user/thomjjames
______________________________________________
https://tomswebstuff.com
Cheers, but
Being a php beginner, I don't know where in my template.php file to insert that code, nor whether or not I should leave in the opening and closing php tags - Everything I've tried results in a blank page when I reload.
sorted!
thanks to gdoteof for the pm.
in page-contact.tpl.php i found:
print $content;and inserted:
print "new content";That depends on what you're adding.
The hooks go in your
The rest of the code gets its own function:
Caroline Schnapp over at 11heavens.com explains it rather well: http://11heavens.com/theming-the-contact-form-in-Drupal-6
Drupal 7
In Drupal 7, it changed to
page--contact.tpl.php. Notice the double dash --.