I need to create some logic on php based on if the current page being viewed is generated by Views. Does the module currently expose variables that allow for that kind of testing?

Comments

rgracia’s picture

This (http://drupal.org/node/216065) previous discussion is somewhat along the lines of what I want to do but it diverts to something else. What I need is what he describes in the first post, a conditional testing way to determine if the current page is a view or not. is that possible?

tracker2k’s picture

You can do the following check:

$views_page = views_get_page_view();
if (is_object($views_page)) {
  // We are on views page
}
rgracia’s picture

Thanks tracker2! This should help.