Fetch page by pagetype handle

Permalink
I want to retrieve all pages under a page type handle name("cat_entry") to dropdown option

 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
$page = Page::getByHandle('your_page_handle');


Rony
Sonam1989 replied on at Permalink Reply
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
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Just trying to do an alternative way. Here is the code:

// 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
Sonam1989 replied on at Permalink Reply
Thanks sir your knowledge for Concrete 5 is really great. It help me a lot.