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

Feature Request: allow the usage of existing fields #4

Closed
jan-dh opened this issue Jun 9, 2020 · 3 comments
Closed

Feature Request: allow the usage of existing fields #4

jan-dh opened this issue Jun 9, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jan-dh
Copy link

jan-dh commented Jun 9, 2020

It would be nice if you'd be able to use data from let's say globals etc. in the field.

For example: make a global instruction field that's editable by the user. Use that global in the readonly field (where instructions is the handle of the global ).

{{ instructions.fieldHandle }}

It makes the content a lot more managable.

@kringkaste kringkaste self-assigned this Jun 9, 2020
@kringkaste kringkaste added the enhancement New feature or request label Jun 9, 2020
@kringkaste
Copy link
Member

Hi! Interesting feature request. But I'm not sure I got you right. Where/how do you want to enter the "Twig-style" template

{{ instructions.fieldHandle }}

into the field? Should this be possible in the field settings? As "unchangeable" predefined content or as default when empty? And when should it be rendered and the content be replaced? Whenever you save the entry or only the first time?

Could you give some more informations how the workflow should be?

@jan-dh
Copy link
Author

jan-dh commented Jun 9, 2020

I'm using the Read-only field at the moment to populate an instructions field for each type of matrix block in a Craft matrix field. Works fine, however I would like an "editor" to be able to edit those instructions without having access to the field settings.

I was thinking of making a couple of global fields, or maybe even a channel with instructions that I'd be able to link to the read-only field, so that the relation is set up in the fields section of the admin panel, but the actual content is maintainable from some place else.

I do realize that there would have to be some relationship defined somewhere so you can trigger the resaving of the matrix field whenever the content of the link channel or global is updated. Not really sure what the best way to go about this would be.

@kringkaste
Copy link
Member

FYI: With the new release 2.0 we added the feature of Twig templates for output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants