This code does not work anymore since updating to 9.0.2. The error is Cannot access protected property Concrete\Core\Block\Block::$btHandle. How to get the block type?
$c = \Page::getCurrentPage();
$blocks = $c->getBlocks(); //Retrieving all Blocks Objects on a Page.
foreach ($blocks as $b) {
if($b->btHandle === ‘film_blok_homepage’){
// code
}
}
?>