Hi, for years i’ve used this code to get the teaser content on a page list fro the page content block if there is no page description, however having updated to v9, I now get the error:
Cannot access protected property Concrete\Core\Block\Block::$btHandle
foreach ($pages as $page) { ...
$blocks = $page->GetBlocks();
foreach ($blocks as $block){
if ($block->btHandle == 'content') {
$blockContent = $block->getInstance();
$description = $blockContent->getContent();
// truncate it to the first paragraph, so we don't pickup unordered feature lists for listings view - td
$description = $controller->truncateSummaries ? $th->wordSafeShortText($description, $controller->truncateChars) : $description;
break;
}
}
... }