Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct fieldset define #1311

Open
peimn opened this issue Feb 8, 2025 · 1 comment
Open

Direct fieldset define #1311

peimn opened this issue Feb 8, 2025 · 1 comment

Comments

@peimn
Copy link

peimn commented Feb 8, 2025

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.

@jackmcdade
Copy link
Member

This feels more like a job for a Partial or a Component where you pass the props in you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants