Hi,
Currently I have something like this:
<section class="bg-color-<?= $background->color()->value() ?> padding">
But I’ve started to improve my workflow by working with variables when the logic is a little more complex, to later on echo the final variable into the file:
if ($layout && $layout->fullScreen()->bool()) {
$primary_class = 'full-screen';
}
<section class="<?php echo $primary_class; ?>">
How can I output a value from a field inside a variable? Something like this
$primary_class = 'bg-color-'echo $background->color()->value()' padding';