Get Pages by a Pagetype

Permalink
How can I get the active pages that use the same pagetype?
$pageType = CollectionType::getByHandle('page_type');
$pages=$pageType->getPages();
foreach($pages as $page){
var_dump($page);
}

When I use the code above, I get multiple pages.
What I want to do is that I want to get the content of a block, which is on several pages that are all have the same pagetype.
And I want to collect this content from another page of a different pagetype.

Does anyone know how to do this?

View Replies:
rainmaker replied on at Permalink Reply
rainmaker
Hello!

You're probably gonna have to use the Page list object:
http://www.concrete5.org/documentation/developers/pages/searching-a...

There's a filterByCollectionTypeID method.