Add breadcrumb

This commit is contained in:
Daniel Siepmann 2020-02-07 14:04:30 +01:00
parent 98ef515b32
commit cac99ad356
2 changed files with 47 additions and 9 deletions

View file

@ -110,6 +110,19 @@ page {
references.fieldName = media
}
800 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
800 {
as = rootline
special = rootline
# First two level are root page and folders for structure
special.range = 2|-2
if {
value = 2
isGreaterThan.data = level
}
}
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
1000 {
as = footerMenu

View file

@ -12,18 +12,43 @@
</f:section>
<f:section name="Aside">
{f:render(section: 'Breadcrumb', arguments: {
breadcrumb: rootline
})}
{f:render(section: 'TableOfContent', arguments: {
contentSections: pageSections.0.content
})}
</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>
<h1>Table of Content</h1>
<ol>
<f:alias map="{contentSections: pageSections.0.content}">
<f:for each="{contentSections}" as="contentEntry">
<f:if condition="{contentEntry.data.header}">
<li>
<a href="#c{contentEntry.data.uid}">{contentEntry.data.header}</a>
</li>
</f:if>
</f:for>
</f:alias>
<f:for each="{contentSections}" as="contentEntry">
<f:if condition="{contentEntry.data.header}">
<li>
<a href="#c{contentEntry.data.uid}">{contentEntry.data.header}</a>
</li>
</f:if>
</f:for>
</ol>
</nav>
</f:section>