Daniel Siepmann
ed2f6b2bc4
Add the table of content in same way with proper linking to sections (content elements) and summary feature.
59 lines
1.6 KiB
HTML
59 lines
1.6 KiB
HTML
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
|
|
data-namespace-typo3-fluid="true">
|
|
|
|
<f:layout name="Content" />
|
|
|
|
<f:section name="Header">
|
|
{data.title}
|
|
</f:section>
|
|
|
|
<f:section name="Content">
|
|
<main>{contentMain -> f:format.raw()}</main>
|
|
</f:section>
|
|
|
|
<f:section name="Aside">
|
|
|
|
{f:render(section: 'Breadcrumb', arguments: {
|
|
breadcrumb: rootline
|
|
})}
|
|
|
|
{f:render(section: 'TableOfContent', arguments: {
|
|
pageContent: pageContent
|
|
})}
|
|
|
|
</f:section>
|
|
|
|
<f:section name="Breadcrumb">
|
|
<f:if condition="{breadcrumb}">
|
|
<nav>
|
|
<h1>Breadcrumb</h1>
|
|
<ul>
|
|
<f:for each="{breadcrumb}" as="page">
|
|
<li>
|
|
<a href="{page.link}">{page.title}</a>
|
|
</li>
|
|
</f:for>
|
|
</ul>
|
|
</nav>
|
|
</f:if>
|
|
</f:section>
|
|
|
|
<f:section name="TableOfContent">
|
|
<nav>
|
|
<details open>
|
|
<summary>
|
|
<h2>Table of Content</h2>
|
|
</summary>
|
|
<ol>
|
|
<f:for each="{pageContent}" as="contentEntry">
|
|
<f:if condition="{contentEntry.data.header}">
|
|
<li>
|
|
<a href="#{contentEntry.data.header -> f:format.id()}">{contentEntry.data.header}</a>
|
|
</li>
|
|
</f:if>
|
|
</f:for>
|
|
</ol>
|
|
</details>
|
|
</nav>
|
|
</f:section>
|
|
</html>
|