Figuring out a conditional statement for a specific page I have a view which is modified by a views template page - this is in Drupal 6.

I'm trying to figure out a condition to affect the layout. Currently, the  element seems to be generated in page.tpl.php, which is fine, but I want to add a condition for this specific page, in order to add an id to this element.

For other pages, I've used the node id to do this, as such:

else if ($node-&gt;nid == '250' || $node-&gt;nid == '429' || $node-&gt;nid == '555' || $node-&gt;nid == '378') {print '&lt;h1'. ($tabs ? ' class="with-tabs"' : '') .' id="medspecheader"&gt;'. $title .'&lt;/h1&gt;';}


But I'm not sure how to do this with the view page. Is there a machine name that I can use, or something to affect the layout?
If you are asking how to modify the default page.tpl.php to do something different when a specific path is called, you could just copy page.tpl.php to page-PATH.tpl.php, eg, page-PATH-THAT-VIEWS-USES.tpl.php and then anything inside this new template would be used just for the page displayed at that path.

In your example code, as an example, you could copy page.tpl.php to page-node-250.tpl.php or page-node-429.tpl.php etc and then you wouldn't need any ifs in them with respect to the id="medspecheader" as these templates would only be used when looking at those nodes.

Just realize that the path used is the drupal system path, not any alias, but Views does create such a path for any Views that utilize a Page Display.

Lots more information about template suggestions for Drupal 6 can be found here.

If these don't work for your specific needs, you can also create more templates suggestions for Drupal to use via a hook_preprocess_page() call in your module or theme.

For example, if you wanted the page to display differently whenever a specific node type is being displayed, and you didn't want to hard code in all of the specific node nids, you could do something like this in your theme...

function YOURTHEME_preprocess_page(&amp;$variables) {

  if (isset($variables['node']) &amp;&amp; $variables['node']-&gt;type=='med_special') {
    $variables['template_files'][]='page-cck-' . str_replace('_','-', $variables['node']-&gt;type);
  }

  // any other page preprocessing goes here

}


Now, whenever page displaying a node of type med_special is called up, Drupal will look for a page-cck-med-special.tpl.php file in your theme to display it.