Dynamic handles in partials #5141
Replies: 3 comments 1 reply
-
What do you need to do with |
Beta Was this translation helpful? Give feedback.
-
@JohnathonKoster how would you handle this in 3.3? |
Beta Was this translation helpful? Give feedback.
-
What a late follow up on this! With the Runtime version, the following is now possible: {{ partial:page-claim handle_prefix="my_prefix_" }} Then, within the partial you can continue referencing your variables like normal: {{ my_field_handle }} When the I wrote up a few more examples here: https://stillat.com/blog/2022/04/22/managing-fieldset-handles-with-antlers-runtime |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using multiple instances of a fieldset within a template and each fieldset has its own prefix. I'm trying to use a partial to show the fieldset each time and thought that I could pass the prefix through as a variable and then use it in the partial to form a field handle name, like this:
{{ partial:page-claim prefix="my_prefix" }}
And then use something like
{{ {my_prefix}my_field_handle }}
within the partial but this doesn't work. Is it possible to achieve what I'm trying to do?Beta Was this translation helpful? Give feedback.
All reactions