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
Updated by Claus Due about 9 years ago
- Category changed from Fluid to Fluid Styled Content
Moved to fluid styled content. You may want to create a separate issue with a feature request for an argument controlling the adding of current query string to f:link.typoLink (because it will not be done as part of this bug fix, I'm sure).
Updated by Riccardo De Contardi almost 9 years ago
For workarounds see comments here #45175
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45053
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45053
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45053
Updated by Gerrit Code Review almost 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45053
Updated by Gianluigi Martino almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d79cee8d0f64016f01e1fec2e6254068af41d548.