-
Notifications
You must be signed in to change notification settings - Fork 243
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
Complex Field: Show field value on Entry #27
Comments
Indeed, it would be cool to be able to define an underscore template so that some logic can be embedded. |
Folks, this sounds like a really useful feature. Care to provide a prototype implementation, and/or a vision of how you'd expect it to be defined from the developer's perspective? |
I created a prototype for this here: tschortsch@f0beb59. Right now I just tested it with Fields of type Text. |
Thanks for taking the initiative! What do you think about the idea of using an underscore template? I was thinking on the case where there is a Field::make('complex', 'staff')->add_fields([
Field::make('text', 'name'),
Field::make('text', 'surname'),
])->set_header_template('{{ surname }}, {{ name }}'); // or set_title, set_header… It would be nice also to support images and other data types… but I'm not sure how doable and desirable it is as a feature. I can imagine use cases where having the image in the header can be a nice touch, but if the JS API it's not developed I understand that it can be quite a work. Just asking… tell me if I can help somehow. ^_^ |
@tschortsch: I believe forcing it wouldn't be a good idea. @doup: I really like that suggestion. We should implement it 👍 |
The feature has been implemented here: #35. |
Documentation of the new feature has been added: htmlburger/carbon-fields-docs@9c7e525 |
Wow, thanks! Looks really neat, I'll test it next week in a couple of projects. 👍 👍 👍 |
It would be usefull to show a (user defined) fields value on an entry when it's collapsed.
The text was updated successfully, but these errors were encountered: