Images on the contact page! Always tricky getting the Drupal contact page to look like the rest of the site, but I found a nice workaround for simple themes.
Making a site recently, I ran into the problem (again) that the Drupal contact page is a distinct entity within the CMS and not a node - there are good reasons for this; it has lots of neat little things built into it like the flood control (how many messages user may submit in an hour), multiple contact categories and so on all built in!
Since it is not a node and not generated by a tpl.php file, you can't style it or change it radically without hacking core ... "Do we hack core to fix our pathetic little styling issues, kids?" ... NO!
I got around this with a couple of tiny little tricks (you have to have IMCE installed and activated for images for this to work):
- I rolled my own template and css for the entire site (more on this coming soon) so the base styling (background, fonts, etc.) was already there.
- After entering all the contact information and categories into the form here: YOUR-DRUPAL-URL-HERE/admin/build/contact, I saved it and went to an existing node where I generated an image tag using IMCE and cut it out onto the clipboard (IMCE won't work in the contact form control area!). In YOUR-DRUPAL-URL-HERE/admin/build/contact/settings, I then pasted the image where I wanted it in the text! Done. Image on the contact page!
- Of course a little more can be done with CSS and the selectors you can find in the contact form output and/or any selectors you care to add in the "settings" area.
Footnote: all other images on the site are styled by a modified SwFIR implementation with jQuery, but since I *really* can't put javascript into the contact form, I modified this one in Photoshop to look more or less like the others. More on the on-the-fly styling and other aspects of this site coming soon ...
Comments
Post new comment