One thing that is difficult to determine at the page.tpl level is if the $content was generated from a Views or Panels page.
Ken Rickard showed me how you can inspect the menu item returned by menu_get_item() to see if the page is a Views page.
$menu_item = menu_get_item();
if ($menu_item['page_callback'] == 'views_page')) {
// The current page is a Views page.
}
A little more digging and I realized I could use the same technique to tell if the page is a Panels page.
Awesome! I had been looking for an easy way to know these things, but never found it.
Comments
Comment #1
johnalbinFixed!
Comment #3
AdrianB commentedJust FYI i added these lines in my template.php to detect more Panel pages:
Comment #4
johnalbinThanks, Adrian. But you need to re-open the issue if you want me to take action! :-)
Comment #5
johnalbinOk. I've added those 2 items to Zen 6.x-2.x-dev.
Now I need to port to D7.
Comment #6
johnalbinNeeds review!
Comment #7
n8tronPatch works for me. Nice work!
Comment #8
johnalbinCommitted.
Comment #9
AdrianB commentedRe #4: Yes, I should have done that but re-open issues is big thing to do that takes some courage... :) Nice to see it being fixed!