Bug #71695
closedtoTop Link reloads page
100%
Description
When using the fluid_styled_content and a content element has a linkToTop, the generated link looks like this:
<a href="#">To top</a>
This link will reload the page, if a baseUrl is set. A better Template would be:
<f:link.typolink parameter="{data.pid}#top"><f:translate key="toTop" extensionName="fluid_styled_content" /></f:link.typolink>
This is still not completly correct. It is not possible to set an empty anchor in f:link.typolink. That's why I used #top. But if there is an element on the page with id (or name) "top", then this link will jump to that element instead of the top of the page.
Secondly, other page arguments will not be added to the url. This could be achieved, if the TypolinkViewHelper would add all QueryString parameters (as in TypoScript: typolink.addQueryString = 1)
This bug exists also in css_styled_content.
It's also possible to just document this incompatibility between baseUrl and linkToTop:
https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#baseurl