ds-site/Resources/Private/Templates/Page/BlogPost.html
Daniel Siepmann 6f7bda85ef Show TOC links for acknowledgements and furtherReading
The variables were not passed to section, always evaluating existing
code to false and omitting the links.
2022-04-01 12:37:49 +02:00

90 lines
3 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">
Blog Post
</f:section>
<f:section name="ContentHeader">
{f:render(partial: 'BlogPostHeader', arguments: {
title: data.title,
blogPost : data,
compatibleWith: compatibleWith,
topics: assignedTopics,
addLinks: 1
})}
</f:section>
<f:section name="Content">
<main>
<a name="introduction"></a>
<h2>Introduction <small><a href="#introduction"></a></small></h2>
{data.abstract -> f:format.html(parseFuncTSPath: 'lib.parseFunc_abstract')}
{introduction -> f:format.raw()}
<f:if condition="{media.0}">
{f:render(partial: 'Image', arguments: {image: media.0})}
</f:if>
{contentMain -> f:format.raw()}
<f:if condition="{acknowledgements}">
<a name="acknowledgements"></a>
<h2>Acknowledgements <small><a href="#acknowledgements"></a></small></h2>
{acknowledgements -> f:format.raw()}
</f:if>
<f:if condition="{furtherReading}">
<a name="furtherReading"></a>
<h2>Further reading <small><a href="#furtherReading"></a></small></h2>
{furtherReading -> f:format.raw()}
</f:if>
</main>
</f:section>
<f:section name="Aside">
{f:render(partial: 'MainMenu', arguments: {
pages: mainMenu.0.children
})}
{f:render(section: 'TableOfContent', arguments: {
pageContent: pageContent,
acknowledgements: acknowledgements,
furtherReading: furtherReading
})}
</f:section>
<f:section name="TableOfContent">
<nav>
<details open>
<summary>
<h2>Table of Content</h2>
</summary>
<ol>
<li>
<a href="#introduction">Introduction</a>
</li>
<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>
<f:if condition="{acknowledgements}">
<li>
<a href="#acknowledgements">Acknowledgements</a>
</li>
</f:if>
<f:if condition="{furtherReading}">
<li>
<a href="#furtherReading">Further reading</a>
</li>
</f:if>
</ol>
</details>
</nav>
</f:section>
</html>