Skip to content

Layout section

Usage PHP/HTML:

<!-- Blok opbouw -->
    <?php

    // Create class name for block.
    $block_prefix = 'custom_name_here';

    // Create id attribute allowing for custom "anchor" value.
    $id = $block_prefix . '-' . ($block['id'] ?? '0');
    if (!empty($block['anchor'])) {
        $id = $block['anchor'];
    }

    // Create class attribute allowing for custom "className" and "align" values.
    $class_name = $block_prefix;
    if (!empty($block['className'])) {
        $class_name .= ' ' . $block['className'];
    }
    if (!empty($block['align'])) {
        $class_name .= ' align' . $block['align'];
    }

    ?>

    <section id="<?= $id ?>" class="<?= $class_name ?>">
        <div class="wrapper wrapper-*">

        </div>
    </section>