Hi there, I’m trying to figure out how to display an “Alt Text” of a Gallery into Layout mixed.
Basically I display different blocks such as Title/video/Gallery block and I want “alt” property linked to file blueprint.
Thanks.
My file blueprint is this one:
fields:
caption:
label: Caption
type: textarea
buttons: false
alt_text:
label: Alt Description
type: textarea
And that is the layout:
<?php if($page->layout()->isNotEmpty()): ?>
<div class="is-layout">
<?php foreach ($page->layout()->toLayouts() as $layout): ?>
<section class="6-column-grid" id="<?= $layout->id() ?>">
<?php foreach ($layout->columns() as $column): ?>
<div class="column" style="--span:<?= $column->span(6) ?>">
<div class="blocks">
<?php foreach ($column->blocks() as $block): ?>
<div class="block <?= $block->type() ?> <?php e($block->isEmpty(), 'is-empty') ?>">
<?= $block ?>
</div>
<?php endforeach ?>
</div>
</div>
<?php endforeach ?>
</section>
<?php endforeach ?>
</div>
<?php endif ?>