Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow array values for meta tags #554

Open
BlackWiCKED opened this issue Aug 11, 2021 · 4 comments
Open

Allow array values for meta tags #554

BlackWiCKED opened this issue Aug 11, 2021 · 4 comments
Milestone

Comments

@BlackWiCKED
Copy link

Feature Request

Currently if we want to add multiple og:image tags, the addMeta function overrides the previous values and will use only the last one. According to the Open Graph specs at https://ogp.me/#array it should be possible to define multiple tags with the same property name. SonataSeoBundle is currently not offering this feature as far as I'm aware of, but please correct me if I'm wrong.

@VincentLanglet
Copy link
Member

CC @core23 Not passing a string seems deprecated since 2.x

if (!\is_string($value)) {

Maybe this should be changed before the NEXT_MAJOR

@VincentLanglet VincentLanglet added this to the 3.0 milestone Sep 26, 2021
@core23
Copy link
Member

core23 commented Sep 26, 2021

IMHO the method signature for the addMeta is correct. Unfortunately the method does not add any new meta value, it replaces it.

Maybe it just needs a fix here:

$this->metas[$type][$name] = [$value, $extras];

Can you do this @BlackWiCKED ?

@BlackWiCKED
Copy link
Author

Sure, I can give it a try.

@VincentLanglet VincentLanglet removed this from the 3.0 milestone Oct 11, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 10, 2022
@github-actions github-actions bot removed the stale label Apr 10, 2022
@VincentLanglet VincentLanglet added this to the 3.0 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants