ideas
ideas copied to clipboard
Direct fieldset define
I’d like to propose the idea of defining fieldsets directly within templates. To illustrate how this could work, let’s dive into an example:
{{ buttons field="{fieldset:call-to-action,type:grid,title:Buttons,fields:{action_title:{title:Action Title},href:{type:link,title:Action Link,collections:[collection1,collection2],required}}}" }}
<a href="{{ href }}">{{ action_title }}</a>
{{ /buttons }}
This will generate a field if it doesn’t already exist, placing it inside a fieldset with the handle call-to-action. The buttons field, which is of type grid, contains two fields: a text field and a link field.