Hide Dashboard Page from Menu
Permalink 1 user found helpful
I have a package that uses a number of single pages in the dashboard. There are 3 pages in each section, which shows up in the drop-down menu in the dashboard. However, there are a few pages that I do NOT want to show up on this menu.
How do I prevent any single page from being visible in a dashboard menu?
How do I prevent any single page from being visible in a dashboard menu?
$p = Page::getByPath('/dashboard/yourpackage/package-page', $version = 'RECENT');
$p->setAttribute('exclude_nav', 1);