toc-js.html.twig in Toc.js 8
Same filename and directory in other branches
Default theme implementation to display a responsive table of contents.
Returns HTML for a responsive table of contents.
Available variables:
- entity: the entity the TOC belongs to.
- title: the title to display for the table of content.
- tag: the tag to use for the title.
2 theme calls to toc-js.html.twig
- TocJsBlock::build in src/
Plugin/ Block/ TocJsBlock.php - Builds and returns the renderable array for this block plugin.
- toc_js_node_view in ./
toc_js.module - Implements hook_entity_view().
File
templates/toc-js.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a responsive table of contents.
- *
- * Returns HTML for a responsive table of contents.
- *
- * Available variables:
- * - entity: the entity the TOC belongs to.
- * - title: the title to display for the table of content.
- * - tag: the tag to use for the title.
- *
- * @ingroup themeable
- */
- #}
-
- {# Do not remove this anchor #}
- <div id="sticky-anchor"></div>
- <div {{ attributes }}>
- <{{ tag }} {{ title_attributes }}>{{ title }}</{{ tag }}>
- <nav role="navigation" aria-label="{{ title }}"></nav>
- </div>