Hello, this time I try to have content from builder going in a column or the other.
I would like the toggle choixcolonne to be in each section of the builder so that the user can choose where the content go.
I try with different combination, I ask for help with this:
<?php if ($block->choixcolonne()->toBool()): ?>
<?php
foreach($page->builder()->toBuilderBlocks() as $block):
snippet('blocks/' . $block->_key(), array('data' => $block));
endforeach;
?>
<?php endif ?>
I get the feedback I do it wrong, I get the feeling I might do it differently in my approach, (I plan to have a snippet for the toggle to repeat in other template blueprint), can you help with this? Thank you
I’ve got two columns, and I want the toggle on each blocks so that the user can choose if the block goes on column 1 or 2. The toggle option made make more sense to me than having one separate builder for each column.
(at this time I just put it on extratext to try)
So basically that means that you have to filter your blocks by the value of the choixcolonne field? So that you can put those with true in one column, and the others in the second column?