$page = page_manager_get_page_cache('<page_name>'); // Replace <page_name> $page = $page->subtask['subtask']; ctools_include('export'); ctools_export_set_object_status($page, TRUE); $page->disabled = TRUE; menu_rebuild();
I've seen this snippet elsewhere and it doesn't work for me. The problem is that page_manager_page_enable always sets $page->disabled = FALSE;
$cache = page_manager_get_page_cache(”);
$page = $cache->subtask[‘subtask’];
$page->disabled = TRUE;
Thanks for your fix. I have updated the code snippet according to your new code. Thanks again for sharing and improving code. Keep in touch with the site.