I recently installed the webforms module (5.x-1.9) so I could add a custom contact page to my site. So far it works great, but it's displaying authoring information at the top of the page which I don't want (e.g., it says "Submitted by SomeUser on Sun, 03/30/2008 - 13:20." at the top of the page ).

How can I hide the display of this authoring information?

Comments

efolia’s picture

Here's how to proceed:

  • In your theme's directory, create a new file called node-webform.tpl.php;
  • Copy the content of node.tpl.php in the newly created file (if your theme does not come with its own node template, copy the content of the generic node.tpl.php provided by Drupal and located in /modules/node/);
  • Remove the offending line -- which probably begins with <?php print t('Posted by')....
  • Save the file.

Drupal will now use this template for every node of type Webform and will not print the authoring information.

Cheers,

efolia

ray_223’s picture

unless I've mis-read the question you should be able to go to:
admin/build/themes/settings
and unselect the webform option for "Display post information on".

Ray Smith
http://RaymondSmith.com

userofdrupal’s picture

Thanks ray_223! This is the quickest way to what I was looking for. I couldn't for the life of me figure out where the setting would be, I keep forgetting that there are some options under theme configuration.

Thanks too efolia, although ray_223's solution is what I was looking for, I think you just showed me something valuable about the template system. From your post I gather that you can create a template that is specific for each content type? Is that correct? So, if I wanted to create a node template just for "story" nodes I would create a template file named:

node-story.tpl.php

So if I create a custom content type with CCK I can totally control the display by making a node template for that type?? Is this right?

efolia’s picture

efolia

efolia’s picture

Indeed, that would work too, of course (silly me) ;-)

efolia

perspectoff’s picture

I'm using Drupal6.13:

Drupal -> Administer -> Themes -> ' ' Garland ' ' -> configure -> Global Settings ->
Disable post information on: (then tick or un-tick the content types on which you want post information displayed)