wintercms / wn-blocks-plugin

Block based content management plugin for Winter CMS.
MIT License
21 stars 5 forks source link

[Bug] Initial block 'add item' FormWidget only appears in the Meta section of Static Pages #32

Closed nmiyazaki-chapleau closed 5 months ago

nmiyazaki-chapleau commented 6 months ago

When no blocks have been defined yet, the "add item" field only exists in the "meta" section of a Static Page.

image image

We can also see the Markup section is only disabled on the "meta" section. Once any block is added, the blocks appear in the main section as well.

The static page layout:

description = "Default layout for static"

[staticPage]
useContent = 1
default = 0

[localePicker]
forceUrl = 0
==
{% partial "site/header" %}

{% component 'staticPage' %}
{{ renderBlocks(blocks ?? []) }}

{% partial "site/footer" %}
{variable type="blocks" name="blocks" tab="winter.pages::lang.editor.content"}{/variable}
damsfx commented 6 months ago

Not sure the page can handle default content and blocks in the same time.

Try :

[staticPage]
useContent = 0
default = 0

To see if the behavior change.

nmiyazaki-chapleau commented 5 months ago

I thought I had tried that.... looks like I didn't. This also fixes #33 . Thanks alot!