Attributes - Block attributes

Last modified:

The $attibutes or $a variables only give you access to data registered in the blockstudio property. To access information about standard block data like alignment or typography, simply use the $block or $b variables.

index.php

                <h1>The block is aligned: <?php echo $block['align']; ?></h1>
    <h1>The block is aligned: <?php echo $b['align']; ?></h1>
Copy
index.twig

                <h1>The block is aligned: {{ block.align }}</h1>
    <h1>The block is aligned: {{ b.align }}</h1>
Copy