How do I do an if conditional based on a view in template.php Related to this question: Adding a body ID to a view page

How do I add a conditional based on whether a page is a view or not? I'm not sure how to test for whether a page is a view.
You can call menu_get_item() and it will return an array containing a lot of information about the path you are on.

Inside that, you can look for

[page_callback] =&gt; views_page
[page_arguments] =&gt; Array (
  [0] =&gt; arg0
  [1] =&gt; arg1
)


or similar, and then based upon that, figure out what View you are looking at.

FYI:  It might not be obvious from the documentation, but if you call it without arguments, it returns the information about the path/page you are currently on.