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

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
fields:
  title:
    label: Title
    type:  text
  builder:
    label: Home Sections
    type: builder
    fieldsets:
      simpletext_full:
        label: Simple Text Box (full width)
        snippet: sections/simpletext_full
        fields:
          text:
            label: Text (Full Width)
            type: textarea
      simpletext_half:
        label: Simple Text Box (1/2 width)
        snippet: sections/simpletext_half
        width: 1/2
        fields:
          text:
            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ā€? https://github.com/getkirby-plugins/patterns-plugin
This would be great!

:slight_smile:

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: https://github.com/lukaskleinschmidt/kirby-modules-field

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.

Yes, I have used the plugin in conjunction with the modules field plugin. Itā€™s easier for the user with that plugin added, but the main problem is that each module is a subpage, so you lose context when editing a module.

As Iā€™m in the progress of making a modules plugin/field video and also a structure field video with some builder comments for Kirby Courses, I recommend the modules solution.

Advantages of the modules approach:

  • PHP preview file instead of entry enabling more logic. That way you wonā€™t ā€œ(ā€¦) lose context when editing a moduleā€ in my opinion.
  • Easier interface with the modules field, especially with a lot of ā€œfieldsetsā€
  • I see the subpages as an advantage because of involuntary overriding
  • Nesting

Agreed, still, there are more advantages than disadvantages in my opinion. But of course, it depends on your client and your needs for certain features. Hopefully, we will have some sort of core structure field that allows nesting in the future, but as we cannot build on that now, we have to find the most stable alternative for our clients.

2 Likes

Duplicate button (Solution).

Has anyone tried using the Builder plugin with the Kirby Field Toggle plugin?

I have tried using the field toggle plugin to help with selecting items in a field group based off selecting certain field group parents.

Here is the thread I started that shows what Iā€™m trying to do.

Same blueprint, same template, different page content

Hey thread, long time no see!

I just wanted to inform you that there is a new version of Kirby Builder for Kirby v3.

Have a nice day.

2 Likes