You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it could be useful if we could define template for the fields. Then we could run something like render() method on field value (inspired by render() on entry, introduced in craft 5):
{{entry.exampleField.reneder()
Within template, element (object that has the field), field (field instance) and value variables would be available. Any additional variables could be passes through optional render() method parameter.
Example usage:
Ckeditor field template containing wrapper with tailwind prose class.
Asset field template containing markup for lazyload or multiple breakpoints functionality.
Verbb Hyper field template containing logic for rendering multiple links and some default classes for rendering links as buttons.
Date field template containing proper formatting setting and <time> wrapper.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think it could be useful if we could define template for the fields. Then we could run something like
render()
method on field value (inspired byrender()
on entry, introduced in craft 5):Within template,
element
(object that has the field),field
(field instance) andvalue
variables would be available. Any additional variables could be passes through optionalrender()
method parameter.Example usage:
prose
class.<time>
wrapper.Beta Was this translation helpful? Give feedback.
All reactions