Views Replacement Patterns from multiple rows

Created on 14 February 2019, about 6 years ago
Updated 13 December 2024, 4 months ago

I'm trying to generate multiple image meta tags from the results of a view so when the view's url is shared on Facebook, it automatically generates a photo carousel. I've been able to pull an image from the first row using tokens in replacement options, but I'd like to show more variety of the page. For me it's a taxonomy topic page on an art site, but could also be applicable for a store category page, a latest news page, etc. Thoughts?

Feature request
Status

Active

Version

1.0

Component

Views integration

Created by

🇺🇸United States troybthompson

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.

  • 🇮🇪Ireland frankdesign

    This is still happening in Drupal 10.3.10 and Metatag 2.1.0.

    I have created a View of all the images that appear in a node, an unformatted list separated by a comma, and used token_embed_views to place a token of that View in the OpenGraph Image field and the Twitter Cards Image URL in Metatag. The View result just has the images - no wrapper divs, extra spaces, returns or any other html. I've tried a View of tags and a View of image URLs.

    For the tag, for both the tags View and the image URLs View, it creates a separate tag per image rather than one tag with a comma separated list of images.

    For the , for the View of tags, only the first image in the list is used to create a single tag. But for the View of image URLs, it creates a single tag with all the images in a comma separate list, but only the first image has the site domain included. For subsequent images, after each comma, it starts with "/sites/default/files/...". "https://www.my-domain.com" is not included.

    Is there a specific format the View result needs to be in for this to work correctly? Or any other suggestions?

    Thanks

Production build 0.71.5 2024