Hi all,
I have installed the Kirby builder plugin because I want to implement a modules function into my website. I downloaded the plugin here GitHub - TimOetting/kirby-builder at kirby_v2 and followed the instructions:
-
I downloaded the plugin into the plugins folder
-
I cloned this file GitHub - TimOetting/kirby-builder: A site builder extension for Kirby CMS site/fields/builder into the site/fields/builder folder
-
I added this code to the yml of the page I want to be able to use modules on:
fields: ... builder: label: Sections type: builder fieldsets: bodytext: label: Body Text snippet: sections/bodytext fields: text: label: text type: textarea imageBanner: label: Image Banner snippet: sections/imagebanner fields: picture: label: Background Image type: image text: label: Headline Text type: text quote: label: Quote snippet: sections/quote fields: text: label: Quote Text type: textarea citation: label: Citation type: text
-
I added this code to site/snippets/builder/imageBanner. php
<section class="imageBanner" <?php if ($data->picture()->isNotEmpty()): ?> style="background-image: url(<?= $page->image($data->picture())->url() ?>)" <?php endif ?> > <h2 class="imageBanner-headline"> <?= $data->text() ?> </h2> </section>
-
I added this code to the php of my page on which I want to implement the modules:
<?php foreach($page->builder()->toStructure() as $section): ?> <?php snippet('sections/' . $section->_fieldset(), array('data' => $section)) ?> <?php endforeach ?>
-
and this code to /site/snippets/sections/imagebanner.php
<section class="imageBanner" <?php if ($data->picture()->isNotEmpty()): ?> style="background-image: url(<?= $page->image($data->picture())->url() ?>)" <?php endif ?> > <h2 class="imageBanner-headline"> <?= $data->text() ?> </h2> </section>
However, when i try to access the panel for that page I get the following error:
Exception
The builder field is missing. Please add it to your installed fields or remove it from your blueprint
What am I missing?
Thank you!