Hi, I am getting the block type handle using getBlockTypeHandle(), so I can wrap HTML around certain blocks.
The issue I have encountered is that if a block is pasted from the scrapbook, it returns the handle of core_scrapbook_display.
Apparently this is because it is a “proxy block”:
https://documentation.concretecms.org/api/8.5.2/Concrete/Block/CoreScrapbookDisplay.html
I need to identify the type of every block, here is my code:
$mainBlocks = $c->getBlocks('Main');
foreach ($mainBlocks as $b) {
// Wrap all blocks except for:
$handle = $b->getBlockTypeHandle();
if ($handle == 'content_with_images' || $handle == 'msm_slider' || $handle == 'parallax_content' || $handle == 'google_api_map' || $handle == 'client_testimonials_carousel' || $handle == 'msm_image_banner') {
$b->display();
}
else {
echo '<section class="content"><div class="container">';
$b->display();
echo '</div></section>';
}
}
How can I identify the block type of these blocks that are just returning core_scrapbook_display ?
Thanks