Hi there–
Is it possible to create a conditional field based on the status of a page?
I want to create a grid overlay that would only have the option to be enabled while the page is in “draft” mode. Something like this:
gridToggle:
label: Layout Grid
type: toggle
when: "{{ page.status }}" = "draft"
I have not been able to get this to work through trial and error and can’t find much documentation about conditionals in the docs. Is this possible to achieve?
Also tried hacking it by piping the page status through a field w no avail, ex:
Status:
type: text
placeholder: "{{ page.status }}"
text: "{{ page.status }}"
Toggle:
label: Show Layout Grid
type: toggle
when:
Status: draft