Plugin for an extended structure field with more than one kind of field set

@texnixe thanks for the reply

There is no connection between the images and quotes, so using image meta-data is not a great solution.

The page might have 15 images, 2 quotes, and 1 description. I’d like to be able to sort the order of all the elements.

One hack would be to have an image named “place-quote-here.jpg” which could be used to position a quote among the files. But that would get messy.

Can you describe what you mean by :

just create the quotes in a structure field and intersperse each image in the folder with a quote from the structure field

Ok, if you need manual sorting and there is no kind of “system”, my suggestion will not work. My idea was pull in the images from the folder in a foreach loop and then to pull a quote after each image or after every second one or whatever.

Another idea that just crossed my mind: if you don’t want to add each image separately, combine the builder with the multi-select field by @distantnative

Another alternative might be to add/remove entries in the builder structure with hooks whenever an image is added/deleted. Then you would only have to bring them in the desired order.

This is really awesome and exactly the solution I was looking for to build my portfolio with Kirby. I’m curious if it’s possible to get the width blueprint parameter to work with these? It seems like it doesn’t really have an effect right now and it’d be nice to visually be able to represent how content takes up space on the page.

I just tried this thing for the first time. What I needed was to be able to add image field to page as well as sorting them.

Support the new image field

It’s great that this plugin support the new image field that is still on the Kirby development branch.

Allow image preview

Match made in heaven. This plugin support a preview of the image after it is added. That makes it a killer plugin for creating sortable image galleries where it’s even possible to add more fields to every image.

It solved this issue

Maybe someone will fix it in the core but until then, this builder plugin seems like the way to go.

It’s Update Time! Builder 1.1.0 is out.

Kirby Builder got some new features:

  • added support for snippets to preview the content of the builder entries inside the panel listing. (The idea came up in the topic Snippetfield + Builder united for the best)
  • replaced the modal as a container for the edit form. Kirby Builder now uses inline forms, that replace the entries’ preview during edit mode (see Topic Get rid of Modals). Unfortunately, the builder field is not yet compatible with nested structure or builder fields.
  • got rid of the table style as the builder fieldsets don’t have to have comparable field sets. Therefore it was kind of pointless to display the content in a table
  • the buttons to add an entry are no longer hidden behind a dropdown field but visible directly under the builder field
  • the builder entries inside the panel now have a class that coresponds to the fieldset name, e.g. the entry of the fieldset bodyText will have the class builder-entry-bodytext. This class can be used in a custom panel css to give these entries specific stylings.

Kirby builder Screenshot

Check it out on github.


Do you have any plans to include such a feature?

Plans? Yes. An idea how? Not yet :wink:

It is quite hard to get an insight on how the panel exactly handles the field content both in Javascript and PHP. There are still some correlation and mechanisms that I do not fully understand.

That’s just great !!
Testing now :slight_smile:

I’ve used it in the latest theme I just published:

Thanks for this awesome plugin. It’s really making our lives easier.

This is great. Excellent work. But I think the entry buttons hidden within the drop-down is cleaner/less cluttered, and it’s more scalable. Only a few entry types will lead to a pile of buttons below - probably breaking to two or more lines. This is compounded when viewed on small view ports.

1 Like

I agree. Having this as a field option would be awesome. Then the developer could decide if a select field or buttons are displayed.

Great work, @timoetting!

I created an issue on github yesterday for this asking to be a field option and @timoetting will ads it soon.

1 Like

@timoetting Just discovering this now and it’s wonderful. It pairs well with @bastianallgeier’s pattern plugin.

In fact it pairs so well, that I wonder if there’s isn’t a good way to reduce some redundancy when the two are used together? I’m not sure if this is the right place for such a suggestion, but wanted to mention it.

1 Like

This is great plugin, thanks so much for your work!

Quick question though: does the plugin support the width: option that normal panel fields support? I saw the reply from @Thiousi, who seems to have width: 1/2 applied to his structure fields. However, I seem to be unable to get it working in my blueprint(s). For example, my code below should allow the user to add both a 1/2 width text field as well as a full width text field to the site. Of course, the half width textfield should only be shown as a half width textfield in the panel as well, as this resembles what it will look like in the front end.

title: Home
pages: false
    label: Title
    type:  text
    label: Home Sections
    type: builder
        label: Simple Text Box (full width)
        snippet: sections/simpletext_full
            label: Text (Full Width)
            type: textarea
        label: Simple Text Box (1/2 width)
        snippet: sections/simpletext_half
        width: 1/2
            label: Text (Half Width)
            type: textarea

As you can see, I tried to apply width: 1/2 to the half width text field. However, the field still appears full width in the panel. (Even if I put another half width field next to it.) Has anyone got any idea what I’m doing wrong?

(Of course, I could probably do some weird custom panel css for certain fields, but I would prefer the native version as it’s much cleaner. :slight_smile:)

Thanks for your help! And thanks for the awesome plugin, it really is a great extension of Kirby’s core functionality.

Hey there !
The width 1/2 is not used here. There is a custom panel css at play that makes the structure fields look that way.
Have a look at this post:

Does this plugin can be used with “Kirby Patterns”?
This would be great!


You mean calling a pattern instead of a snippet to output the content of the field? Yes, that should be possible.

I’m evaluating this Builder plugin against the Kirby Modules Plugin. Both has it’s pros and cons.

For the end user, I like the approach of the Kirby Builder plugin, where everything is on one page. When editing a module/section, you can always see what other page content before and after. In the Kirby Modules Plugin, you lose context when editing a module, since the module is a different page.

And I’m not sure if I like the approach that the Kirby Modules Plugin uses subpages for storing content. It feels like a hack. And some of it’s drawbacks is that you can’t delete a page that has modules. But the big thing that holds me back is the fact that you jumps to a different page when editing a module, and thus loses context.

The Kirby Builder Plugin has a big drawback that you can’t use structured fields. But apart from that, it seems like a more easier plugin for the end user.

But, when looking at the repos, the Kirby Builder Plugin has not had much activity since the summer of 2016. The Kirby Modules Plugin seems more actively maintained. Does @timoetting or someone else intend to keep maintain the plugin?

1 Like

I haven’t tested it myself yet, but the Kirby modules field in conjunction with the modules plugin would resolve some of the problems you have with the modules approach:

While I really like the Builder plugin, it’s main drawback is the fact that you can’t used structure fields within, which makes it unusable in some contexts, unfortunately.