Closed clash82 closed 8 years ago
ping @Plopix @SylvainGuittard
And how about the Multiple emplacement objects ? They need a canonical right ?
And how about the Multiple emplacement objects ? They need a canonical right ?
Well, I don't know exactly how to cover this case automatically but adding canonical link on every page is not a good idea as well. IMO canonical link should be added manually every time when is needed only. User should use canonical field and decide which location should be canonical in case of many locations.
How to have only one canonical link? Here is how it should work
Use case 1: Canonical field (NovaeZSEOBundle) and one location
<link rel="canonical" href="{{ meta.content }}" />
Use case 2: Multi location of an object and canonical field empty
<link rel="canonical" href="{{ path( 'ez_urlalias', {'locationId': contentInfo.mainLocationId} ) }}" />
Use case 3: Multi location of an object with canonical field (NovaeZSEOBundle)
<link rel="canonical" href="{{ meta.content }}" />
Use case 4: Only one location and canonical field empty -> No canonical link
After rethinking everything we decided to change our approach of implementing canonical link. Thank you for your commitment @Plopix and sorry for this.
Canonical link should be created only in case when it was added manually by the user.
There is no need to add it for all the pages. We have a situation where we're using our implementation of this feature and we don't want to show one that comes with this bundle ;)