Fetch page by pagetype handle
Permalink
I want to retrieve all pages under a page type handle name("cat_entry") to dropdown option
I have added a new page type ("Category Template") and handle ("cat_entry") and now i want to retrieve page under this page type how i can do it as this
Page::getByHandle('cat_entry');
is not working
Page::getByHandle('cat_entry');
is not working
Just trying to do an alternative way. Here is the code:
Rony
// Get a list of all viewable pages $objHome = Page::getByID(HOME_CID); $strHomePath = (string) $objHome->getCollectionPath(); $objPl = new PageList(); $objPl->filterByPath($strHomePath, TRUE); $objPl->filterByCollectionTypeHandle('right_sidebar'); $objPl->ignoreAliases(); $arrAllowedPages = (array) $objPl->get(); $objPerm = new Permissions($objHome); if($objPerm->canRead()) array_unshift($arrAllowedPages, $objHome); echo '<pre>'; print_r($arrAllowedPages);
Rony
Thanks sir your knowledge for Concrete 5 is really great. It help me a lot.
Rony