- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
This still needs works because of the tests. I needed this too, but I actually needed being able to customize the join ΒΏseparator?
With this patch
[node:multivalued_field_image:array:target_id:join:+] would return 1+2
[node:multivalued_field_image:array:target_id] would return 1,2This definitely needs a ton of tests though. I'm marking it as needs review just to see if current tests are still passing with this.
- Status changed to Needs work
almost 2 years ago 3:53am 25 January 2023 - πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
At least I didn't broke anything. Back to needs work.
@Berdir @Anybody Can we work on defining the minimum acceptable test cases that would need to be for this to be accepted?
I'm willing to work on those. - πΊπΈUnited States lisagodare@gmail.com
I also needed the ability to customize the join separator, but #28 didn't work for me. I modified it just a little bit.
- Status changed to Needs review
over 1 year ago 3:12pm 28 February 2023 - πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
Marked as NR to check if tests still pass.
@lisagodare@gmail.com Could you describe your scenario? If last patch wasn't working for you, maybe is something to consider when we write the tests. - πΊπΈUnited States lisagodare@gmail.com
Sure thing!
It's sort of complex, but in the end I'm using tokens + metatag + pivot (multivalue in metatag), and needed to not use the default comma as separator, because that breaks on text that has commas in it.
Using the patch in this issue for a custom delimiter in Metatag, which I have set to `||`:
https://www.drupal.org/node/3067803 β
And using patch in #28, my field token looks something like:
[node:multivalued_entity_reference_field:array:entity:field_text:join:||]However, this resulted in always using a comma for the separator, until the changes I made in #30.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
Thanks for the answer! Yeah, my scenario was similar with schema_metatag, i had a similar token pattern that you do and in my case I needed β¨ Improve support for multi-value schema using Metatag's custom separator option Fixed , so I might overlooked yours. Thanks for documenting it!
- πΊπΈUnited States carsoncho Kansas City, MO
This patch does not appear to work with. I'm attempting to get a multivalue term reference field to output the term names in a list with this [webform_submission:values:multivalue_term_reference:array:entity:name] and it's being output as "Term 1 (1)entityTerm 2 (2)".
I am doing this via custom code with a custom WebformHandler that's calling on the webform submission handler's token service.
Any thoughts?
- First commit to issue fork.
- last update
about 1 year ago 77 pass For me, patch #30 doesn't work for image-style tokens like [node:field_image:array:image_style] or [node:field_image:array:entity:image_style]
Patch #36 fixes works for [node:field_image:array:image_style]- First commit to issue fork.