Closed PetteriSeoka closed 1 year ago
I haven't used flexible content fields in awhile but as far as I know you need to remove ->addLayout()
from $text
:
$text = new FieldsBuilder('text');
$text
->addText('title')
->setWidth('30')
->addWysiwyg('content')
->setWidth('30')
->addRange('width');
return $text;
and then use ->addLayout
on your $builder
:
$builder = new FieldsBuilder('builder');
$builder
->addFlexibleContent('komponenter', [
'button_label' => 'Lägg till komponent',
])
->addLayout($this->get(Text::class))
->endFlexibleContent();
Great! This worked! Thanks! :)
Hi!
First of all, great tool for ACF!
I have a slight problem. I'm trying to create a pagebuilder where I keep the layouts in separate partials. I have read your readme file and searched in endlessly in the Sage community without solving this issue. Could you please point me to the right direction?
Much appreciated,
Petteri
Test.php
Builder.php
Text.php