Just getting into PageBuilder (and still figuring out PW in general).
Where I was stuck currently is how the get the blocks working with multilingual fields.
For example I simply wanted to have the /RockPageBuilder/blocks/Text example block to show the TinyMCE Inline field as Multilanguage Textarea.
// from RockPageBuilder/blocks/Text/Text.php..
public function migrate()
{
$rm = $this->rockmigrations();
$rm->migrate([
'fields' => [
self::field_text => [
'type' => 'textarea',
'inputfieldClass' => 'InputfieldTinyMCE',
'contentType' => FieldtypeTextarea::contentTypeHTML,
'label' => 'Text',
'rows' => 5,
'icon' => 'align-left',
'inlineMode' => true,
// 'rpb-nolabel' => true, // hide label in backend
'settingsFile' => '/site/modules/RockMigrations/TinyMCE/text.json',
'textformatters' => [
'TextformatterRockFrontend',
],
],
],
'templates' => [
$this->getTplName() => [
'fields' => [
RockPageBuilder::field_eyebrow,
'title' => [
'label' => 'Headline',
'icon' => 'header',
],
self::field_text,
],
],
],
]);
}
in the Accordion example block is the easy solution:
'type' => $this->wire->languages ? 'textareaLanguage' : 'textarea',
Maybe this should be in every example block and in the vs code snippets, cause that would've saved me some time.