SEO and Link Alternate


#1

Hello,

I have 2 questions abouts Links Alternate. Can you help me?

  1. How can I generate Link Alternate in the for the Documents ?
  2. How can I generate Link Alternate for Data Objects ? For example, if my website is in English and French, and if I use Data Objects for my posts news, I also need to generate Link Alternate for these urls. Is it possible? Is a generic solution is possible (to copy past between website project without editing the code on every project) ?

The documentation about Link Alternate is a very poor : https://pimcore.com/docs/5.x/Development_Documentation/MVC/Template/Templating_Helpers/HeadLink.html

Do you have any useful example about it?


#2

this could help you:

https://www.coreshop.org/docs/2.0.0/Bundles/SEO_Bundle.html

It also uses the HeadLink helpers but abstracts it a bit. You can implement custom Extractors and append data to the SEOMetadata. The CoreShop Helper then appends that to HeadLink for you.