Hi,
i need some help with layout setting. The id is displayed as a long number.
My home.yml has this code:
settings:
fields:
class:
type: text
width: 1/2
id:
type: text
width: 1/2
image:
label: Background image
type: files
When i write something like “home-intro” in the id field it is not displayed. Instead i get a long number. I use this code to render the layout:
<?php foreach ($page->layout()->toLayouts() as $layout): ?>
<section class="grid" id="<?= $layout->id() ?>">
<?php foreach ($layout->columns() as $column): ?>
<div class="column" style="--span:<?= $column->span() ?>">
<div class="blocks">
<?= $column->blocks() ?>
</div>
</div>
<?php endforeach ?>
</section>
<?php endforeach ?>
</article>
The field for css classes are working if i change id to class. When i do a vardump i can find the id under attr. What i’m doing wrong?