Use custom delimiter instead of commas for multiple values

Created on 15 July 2019, over 5 years ago
Updated 15 August 2024, 3 months ago

Schema Metatag depends on Metatag module to do token replacements, but one kind of replacement that is a problem is managing content which may contain commas where multiple value fields are delimited with commas, because we have to explode on the delimiter to convert those lists back into arrays.

Token module provides tokens for multiple field values that join multiple values with commas, but the code will use a different delimiter if passed as a 'join' option. Using a custom delimiter would fix most of the problems we're having in Schema Metatag.

Metatag module calls token replace with a hard-coded array of options that contains only a language option. As currently configured, there is no way to pass any additional options to the Token service. I tried to find a way to get this working without any patches, but I think a small patch is required to allow an alter hook right before the tag is replaced.

Patch coming.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States KarenS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024