Commit 111b47c9 authored by Richard Haeser's avatar Richard Haeser
Browse files

[DOCS] Add hint how to alter or remove hreflang tags

In some edge cases you may want to disable or change the rendering of
the hreflang tags. We added some hints how to deal with such cases.

Resolves: #91353
Releases: master, 10.4
Change-Id: Id9ea8a0206cd9df1522d790c2cad93e2ab41afbb

Tested-by: default avatarTYPO3com <>
Tested-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: default avatarMartin Kutschker <>
Tested-by: Richard Haeser's avatarRichard Haeser <>
Reviewed-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: default avatarMartin Kutschker <>
Reviewed-by: Richard Haeser's avatarRichard Haeser <>
parent 6450b0f5
......@@ -114,12 +114,15 @@ Hreflang Tags
The generation of the :html:`<link rel="alternate" hreflang="" href="" />`
tags is done automatically if the page is available in other languages.
This feature should work correctly in almost all cases.
If you have a specific edge case, and you don't want TYPO3 to render those tags, you can disable rendering of the those tags completely.
You just have to put this line in the :file:`ext_localconf.php` of an extension and make sure your extension is loaded after EXT:seo.
.. code-block:: php
TYPO3 is using PSR-14 events to handle the generation of those hreflang tags.
If, for some reason, you would like to alter or remove the automatically generated
tags, you can register your own EventListener. This EventListener should listen
to the :php:`TYPO3\CMS\Frontend\Event\ModifyHrefLangTagsEvent` event. Just make
sure your EventListener is ordered after the :php:`TYPO3\CMS\Seo\HrefLang\HrefLangGenerator`
More information how to work with EventListeners can be found in the documentation of :ref:`t3coreapi:EventDispatcher`
.. _config-canonical-tag:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment