Detecting Dashboard pages,

Permalink 1 user found helpful
Iv been having some trouble, i can;t figure out how to detect if a page is a dashboard page, like

$page = Page::getCurrentPage();
$page->isDashboardPage();

there is $page->isSystemPage(), but that is all core pages and does not include pages added via package,

any help is great!

Mnkras
 
olliephillips replied on at Permalink Best Answer Reply
olliephillips
What about the isAdminArea() method?
hereNT replied on at Permalink Reply
hereNT
$page = Page::getCurrentPage();
$cPath = $page->getCollectionPath();
   if (strpos($cPath, '/dashboard') !== false && strpos($cPath, '/dashboard') == 0) {
      // do something
   } else {
      // do something else
   }


If you'd check in on the damn IRC, you'd see that I have the theme switcher package finished as of about 15 min after you signed off last night :P
Mnkras replied on at Permalink Reply
Mnkras
dammit man, i havn't checked >.<

and thanks ollie, some how i missed that when looking through the page model >.<
olliephillips replied on at Permalink Reply
olliephillips
Helping you Sir has made my week!