Hello.
I am trying to get a dynamic list of subpages in a form <select> field.
Here’s an extract of what I’m trying to write in the frontmatter:
content:
items: @self.children
form:
name: select-a-page
fields:
-
name: page
label: 'What page?'
type: select
options:
'{% for p in page.collection %},{{ p.slug }}:{{ p.title }},{% endfor %}'
validate:
required: true
But it gets an Invalid frontmattererror when saving. How can I do this?
Thanks!