Tag Archives: Link To Top

Typo3 Link To Top Feature Fluidtemplate

If you like to modify the „Append with Link to Top of Page“ output of fluidtemplate (fluid_styled_content) (which is the default setting of Typo3 Version 8. However you can even use it with Version 6 or 7) you need to create an partial override.

Hint: When using css_style_content you can use tt_content.stdWrap.innerWrap2 ... to modify the output.

First you need to add the location of your override directory to you setup:
lib.contentElement.partialRootPaths.100 = EXT:tpl_site/Resources/Private/Partials/override/

Within this directory you now can override any file of
typo3/sysext/fluid_styled_content/Resources/Private/Partials
Beware of the folder structure!

The render of the „to top“-feature is in the file „Footer/All.html“. Therefore we need to create this file. It is a good idea to copy the original file and then make the modifications you like to do. I liked to add a class. So this is my file:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{data.linkToTop}">
<a class="topTopLink" href="#top"><f:translate key="toTop" extensionName="fluid_styled_content" /></a>
</f:if>
</html>