Custom Webform Page Layout in Drupal 6

786 views Asked by At

I recently finished building an intranet site with Drupal 6 (client mandated the older version) using the Zen theme. The site contains several (20+) survey pages made with Webform.

Client wants to change the layout of the webform pages to have a full width content area and no sidebar. I found that I can make a custom template page named "page-node-53.tpl.php" and that will work on ONLY node/53. This would be fine if I only had one Webform page.

Is it possible to make a custom layout page and somehow assign it to only the webform nodes? This can easily be done in Wordpress... just wondering if there's an easy way to do it in Drupal? Thanks!

1

There are 1 answers

0
danzo On BEST ANSWER

I figured it out...

First, I changed the name of the custom template file to "page-webform.tpl.php".

Next, I added the following code to the top of page.tpl.php before the DOCTYPE declaration:

<?php if ($node->type == 'webform') {include 'page-webform.tpl.php';  return;  } ?>

It appears to have worked! Every page is unchanged except the pages that feature a Webform.