Closed mcbrwr closed 5 years ago
@mcbrwr Thanks for the fixes!
Although nested builders as well as utilizing a structure field won't work: Saving throws a validation error without anything to validate.
Blueprint to reproduce:
type: fields
fields:
builder:
label: Builder
type: builder
columns: 1
fields:
prices:
label: Prices
type: builderSet
fields:
table:
label: Subbuilder
type: builder
columns: 2
fields:
product:
label: Product
type: builderSet
fields:
features:
label: Features
type: structure
fields:
text:
label: Text
type: text
Hey,
Check out the latest version. I fixed the issue with structure, file and page fields while remaining the original syntax including fieldsets and tabs.
FYI:I will finish the documentation today and move this repo over to the original kirby builder repo.
unfortunately... files field is still not working:
the error:
{"status":"error","exception":"Whoops\\Exception\\ErrorException","message":"Invalid argument supplied for foreach()","file":"plugins\/builder\/config.php","line":285,"code":2}
the blueprint for the builder:
type: builder
label: Content builder
fieldsets:
textimg:
tabs: false
icon: edit
label: Tekst & afbeelding
fields:
text:
type: text
image:
query: page.images
type: files
hmm my bad: the tabs field can now not exist anymore.. it crashes the loop. I removed tabs: false
and it now works
Added endpoints so the files field can render. Besides that, the v3 api needs sets of fields directly nested, an "inbetween" group like "fieldsets" is not possible anymore. We added a fieldtype "builderset" as replacement for the fieldsets.
btw: The fact that fieldsets need to be directly nested will also affect the idea of tabs. These need to be set up in a similar fashion. So for now we removed them from the readme.
Hope this helps! Have a nice weekend :)