toc-back-to-top.html.twig in TOC API 8
Default theme implementation to display a back to top link.
Returns HTML for a back to top link.
Available variables:
- item: A table of contents header item.
- options: Options associated with the current header item.
1 theme call to toc-back-to-top.html.twig
- TocBuilder::renderContent in src/
TocBuilder.php - Renders a table of contents' body.
File
templates/toc-back-to-top.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a back to top link.
- *
- * Returns HTML for a back to top link.
- *
- * Available variables:
- * - item: A table of contents header item.
- * - options: Options associated with the current header item.
- *
- * @ingroup themeable
- */
- #}
-
- {% set classes = ['back-to-top'] %}
-
- <a{{ attributes.addClass(classes) }}>{{ label }}</a>