Code Block Samples

Represents preformatted text which is to be presented
exactly as written in the HTML file.

<?php foreach ($page->myBlocksField()->toBlocks() as $block): ?>
<div id="<?= $block->id() ?>" class="block block-type-<?= $block->type() ?>">
  <?php snippet('blocks/custom/' . $block->type(), [
    'block' => $block,
    'theme' => 'dark'
  ]) ?>
</div>
<?php endforeach ?>
**We serve cookies on this site to analyse traffic and optimise your experience. ** If you are happy to accept cookies, please continue browsing. To opt-out of performance cookies, please review our Privacy Policy.