[TASK] Create URLs with typolink for pages with sites 63/58063/17
authorBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 17:33:44 +0000 (19:33 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 22:37:57 +0000 (00:37 +0200)
commit7f0174beefa9e0a7305a09616d51d8f618b96930
tree1f102ece35d1231e73ffed4f1164d626be8fc9c7
parentd68b3957ed08abae14acfb4ee42d67d3bb465876
[TASK] Create URLs with typolink for pages with sites

The PageLinkBuilder now separates out into generating links
for pages with site configuration, and without site
configuration (= as before).

The new link mechanism does not rely on previous hooks
and options like config.absRefPrefix which are not necessary
for URLs as they are always absolute.

A new TypoScript option "typolink.language" is introduced.
If not set, it is set to "current", and allows to link
across pagetrees to a given site, or render a language menu
without having to use "&L=" as additional query parameter.
 ("current" is the current language and default) is
used to also allow to explicitly link to a different language
if this language was configured for the site configuration
for the site.

As for the linking process:
- typolink.forceAbsoluteUrl is used to generate the full
  URL to a target page
- typolink.forceAbsoluteUrl.scheme is only applicable
  if the site base of the target does not explicitly
  define a scheme
- If you link to a different page tree or to a different
host/scheme, it is always treated as absolute.

On top: If you link across page trees, the link is
treated as external (extTarget is used).

The next steps are to create tests and incorporate
config.linkVars into this process.

Resolves: #86048
Releases: master
Change-Id: I01b2b43efafa23ce0d256bdcd0feb35756fbe1d5
Reviewed-on: https://review.typo3.org/58063
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
typo3/sysext/core/Classes/Routing/PageUriBuilder.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/LinkGeneratorTest.php