TimOetting / kirby-builder

A site builder extension for Kirby CMS
398 stars 51 forks source link

default content of a structure field #137

Closed grommas closed 2 years ago

grommas commented 5 years ago

Hey, thank you for your great work! I am currently testing your plugin, but predefined content for a structure field is not showing up. Everything works as aspected outside your field. Here is a test case:

columns:
  - width: 2/4
    sections:
      fields:
        type: fields
        fields:
          builder:
            label: Content
            type: builder
            fieldsets:
              relevant:
                name: List
                label: List
                fields:
                  relevantStructureField:
                    type: structure
                    fields:
                      testHeadline:
                        type: text
                        label: Headline
                      testContent:
                        type: text
                        label: Content
                    default:
                      - 
                        testHeadline: Test Title 1
                        testContent: Test Content 1
                      - 
                        testHeadline: Test Headline 2
                        testContent: Test Content 2
steirico commented 5 years ago

I see the same issue with checkboxes, too.

As far as I'm aware kirby writes default values to the initial .txt when adding a new page. Then the page's .txt file is read as usual and values are transmitted to the panel. I suppose that panel fields do not take default values into consideration directly as defined in the blueprint.

Therefore, I guess this is issue is hardly related to kirby and not easily fixable by this plugin.

@TimOetting: What's your opinion on this?

TimOetting commented 2 years ago

Closing this issue because this plugin will no longer be maintained, as its main functionality can be replaced by Kirby's built-in Blocks Field and Layout Field.