Closed CreateSean closed 3 months ago
Currently it's not possible to do this other than using custom Twig to do it, something roughly like:
{{ entry.myMatrix.one().assetfield.one().getUrl() }}
Two things,
I am unable to get that to work using:
{{ entry.hero.one().collectionImaage.one().getUrl() }}
second, when making changes to one entry type in the same section, the settings duplicate over to all other entry types.
So in the pages Channel I have entry type of Contact page and Our Team, I tried to set different options in the image setting but it whatever was saved last is applied to all entry types.
Get it working in the page template for that section, and then paste the working code into the SEOmatic setting.
As for the entry types, you should be able to set settings on a per-entry type basis. There's a menu that lets you choose the entry type you're saving settings for.
weird that the entry types wasn't working yesterday but is today.
Have got this working in front end template {{ entry.hero.one().collectionImage.one().url }}
but doesn't work in the SEOmatic settings
Additionally, I set up another section that has a dedicated image field - this is not being used as the SEO image as expected.
Have you tried using the SEOmatic debug toolbar panel to see what the values look like for the variables on that page?
https://nystudio107.com/docs/seomatic/advanced.html#debug-toolbar
As for your second comment, can you give me more context? You're saying that pulling the image from a dedicated field is not working? Can you show screenshots of your SEOmatic settings?
Also did you set up the Global SEO settings to have a fallback image?
Is there an SEO Settings field that could be overriding things here?
So when I updated the global SEO image setting everything started working.
sorry for the hassle
That sounds like a bug that I should address, though
craft 5.3.4 SEOmatic 5.1.2
Question
I'm setting up content SEO on a new Craft 5 build -with content imported via feedme from a Craft 2 site. and I need to set the SEO Image source for SEOmatic to a image field in a matrix. How do I do that? Is this possible?
There will only ever be one matrix block with one image.
Additional context
Add any other context or screenshots about the support request here.