Kirby Builder: Simply will not work, conflicting documentation/support?

Hello all, new to Kirby but not to PHP, code or CMS.

I am thoroughly confused by the documentation provided with the Kirby Builder plugin and the related support tickets. It’s not clear where the code goes, what code goes where, etc.

Does anyone have links or suggestions for getting this all straight?
I’m finding it very frustrating and I can’t get the plugin to work at all.

Any help is appreciated. I wish the git had better documentation.

I have tried putting the plugin in the plugins folder as well as the site/fields/builder folder.

Welcome to the forum :slight_smile:

It should not go in the sites/fields folder. The plugin uses blocks. so you need to install it and then setup blocks to work with. These need a blueprint in site/blueprints/blocks and a corresponding snippet in site/snippets/blocks.

Then you render them in the template with…

<?php # /site/templates/yourtemplate.php
foreach($page->contentbuilder()->toBuilderBlocks() as $block):
  snippet('blocks/' . $block->_key(), array('data' => $block));
endforeach;
?>

So my fields blueprint using the builder field looks something like this…

fields:
  contentbuilder:
    label: Page Blocks
    type: builder
    columns: 1
    max: 99
    fieldsets:

      # Content
      basiccontent:
        label: Basic Content
        extends: blocks/content

And the blueprint for the basiccontent block:

type:      group
fields:
  text:
    label: Text
    type:  textarea
    size:  large

and its snippet:

<section class="basiccontent">
  <?= $data->text()->kt() ?>
</section>

I hope that helps.

Thank you, this helps a little … my brain is so fried from all the posts I’ve been reading
I’m still confused…

Is this close to what you’re outlining?

site/blueprints/blocks/fields.yml
How do I get this blueprint to show in a page panel? Do I extend it in default blueprint?

fields:
  contentbuilder:
    label: Page Blocks
    type: builder
    columns: 1
    max: 99
    fieldsets:

      basiccontent:
        label: Basic Content
        extends: blocks/content

The plugin folder goes here…?
site/plugins/kirby-builder-master

I feel comfortable getting the content to output in the snippets but I cannot get any fields to show up anywhere in the admin/panel area.

You need a page blueprint in. /site/blueprints/pages where you define the builder field.

Then you can define a fieldsets in site/blueprints/blocks/fields.yml (or whatever you want to call it/it also doesn’t have to be the a subfolder called blocks), that you then extend in the page blueprint. You don’t have to do that, but it keeps the main blueprint cleaner.

You can find an pretty clean example setup in our demokit:

1 Like

Thanks you so much, this helped a great deal. That example helped me understand better where things can go, how to access them and tie a few things together.

Thanks again!