Problem with layout ouput

I have problem with markdown in my custom template. I am playing with layouts (I am newbie), but output from my template is:
instead a nice rendered output. What is wrong?

I use this snippet:
<?= $page->text()->kt() ?>

Also I tried the next one (from docs), but it dosn’t display any output:
<?php foreach ($page->layout()->toLayouts() as $layout): ?>
Preformatted text
<?php foreach ($layout->columns() as $column): ?>
<div class="column" style="--span:<?= $column->span() ?>">
<div class="blocks">
<?= $column->blocks() ?>
<?php endforeach ?>
<?php endforeach ?>
What I did wrong?

If the field is still called text, then you have to use this field name:


Thx @pixelijn for quick answer. It works :slight_smile:

Sub-question: I noticed the rendered layout is totally breaked. All content parts are in one column. I had hoped I will solve it studying docs, but nope. I will be grateful for help.

It should be displayed like on a picture

Simply using the example as in the blocks without applying the respective styles doesn’t really make sense. Since you are using Bulma, you would have to apply the classes for columns from this CSS framework rather then using the CSS variables --span-xwhich are not defined in your stylesheet.

Okey-dokey. I didn’t be sure which classes are necessary and which are optional. Now it seems to be fine. Thanks.