Closed dbu closed 4 years ago
I think, we can just add a layer in sonatas seo config for the metas:
sonata_seo:
title: Default title
page:
names:
en:
description: Descriptin in en
keywords: Keys, english
de:
description: Beschreibung in deutsch
keywords: Schlüssenwörter, deutsh
cause sonata just mapp everything under names
in an array (i hope i am right with that depth). The only thing we need to care is to correct the structure in the SeoContentListener
cause sonata will render only this structure into the meta tags:
...
names:
description: Descriptin in en
keywords: Keys, english
But we would cause a realy problem for users which use that config without our SeoBundle. But i don't realy know what we can do with the title. @rande ?
I would thing to put this title language agnostic in our config. Then the SeoContentListener
can chose the right and put it to sonatas `PageService.
We don't handle multilanguage. I don't think the bundle should care about it.
The default configuration is just here to set default values, like facebook app id and other values.
With SonataPageBundle
the Site
instance contains Seo information, so on each request we update the SeoPage
instance: https://github.com/sonata-project/SonataPageBundle/blob/master/Site/BaseSiteSelector.php#L93-L105
@dbu that sounds for that i should redo our cmf-seo defaults as i had it with integrating a multilang behavior as in the SimplePageBundle (the one with the yml import of the content). And finaly i would feed SeoPage Service with language agnostic values. What would mean: default values with cmf-seo should be set in cmf-seo config only.
might be a stupid question, but why not using the SonataPageBundle to create the SimplePageBundle ? look like you are reproducing the same piece of code.
Cause the seoHandling shouldn't be provided for CmsPageBundle only. It's based on an interface which can be mapped to "every document". If there are sonatas twig helpers somewhere in the template it will work. I just used the CmsPageBundle's page definitions as an example for defining mulitlang properties in a config.
Any news about this ?
Using the CMF and PHPCR the CmfSeoBundle would do that for you.
Am 23.11.2015 um 22:26 schrieb Aymane:
Any news about this ?
Reply to this email directly or view it on GitHub: https://github.com/sonata-project/SonataSeoBundle/issues/43#issuecomment-159069555
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I still do not understand if there is support for multilanguage in sonata-project/SonataSeoBundle Or olny way to have multilanguage support is using symfony-cmf/seo-bundle which is unsupported for years ?
in https://github.com/ElectricMaxxx/CmfSeoBundle/issues/26 we are wondering how the sonata seo bundle does multilanguage on things like the default site title, description or the keywords.
/cc @ElectricMaxxx