Adding a body ID to a view page I would like to add a body id to a view page in Drupal 6 - would I modify template.php? I'm trying to figure out where to make the correct modification
You can do this in a couple ways.

Easiest, if you have only one Views page that needs this, you could go into your theme's directory and copy page.tpl.php to page-PATHTOVIEWPAGE.tpl.php and then inside there, put in the id, eg,

&lt;body id="ID" ... &gt;


Just change any /s in your path to this page to -s in the template name and you should be all set.  Take a peek at Drupal 6 Template Suggestions for more info.

Now, if you are going to want to do this in multiple pages or need it to be more extensible, then, yes, you will most probably want to add in a preprocess_page() hook in template.php as well as another custom page.tpl.php template file. 

What you could do would be to copy page.tpl.php inside your theme to, let's say page-with-body-id.tpl.php.  Then, inside there, you could put something like this:

&lt;body id="&lt;?php print $body_id; ?&gt;" ... &gt;


Then, inside template.php you would add in a preprocess_page() hook, eg, something like this:

function YOURTHEME_preprocess_page(&amp;$variables) {

   $whereami=$_GET['q'];  // eg, www.yourhost.com/WHEREAMI

   switch ($whereami) {

     case 'events':
     case 'news':
     case 'press':

       $variables['body_id']=$whereami;
       $variables['template_files'][]='page-with-body-id'; // and use this new template

       break;

    }

    // any other page preprocessing goes here

 }


Just make sure you don't create a page template that would match an existing path on your system.  I doubt www.yoursite.com/with/body/id exists but you never know :)

Otherwise, another good place to look for info is here: Overriding Theme Templates in Drupal 6.

Also, if you can use a body class instead of an id, this is even simpler:

function YOURTHEME_preprocess_page(&amp;$variables) {

   $whereami=$_GET['q'];  // eg, www.yourhost.com/WHEREAMI

   switch ($whereami) {

     case 'events':
     case 'news':
     case 'press':

       if (empty($variables['body_classes'])) { 
         $variables['body_classes']='view-' . $whereami;
       } else {
         $variables['body_classes'].=' view-' . $whereami;
       }

       break;

    }

    // any other page preprocessing goes here

 }


which will add view-WHEREAMI to the list of classes for the body in (most) default page templates.

RE: How do I do an if conditional based on a view in template.php, you can also do something like this in the appropriate spot:

$mgi=menu_get_item();

if ($mgi['page_callback']=='views_page' &amp;&amp; $mgi['page_arguments'][0]=='WHATVIEWYOUARELOOKINGFOR') {

  // you are on the views page you are looking for

}