Add content element MenuSubpages to create an overview of workshop

topics
This commit is contained in:
Daniel Siepmann 2020-02-07 11:23:06 +01:00
parent a59b366bb8
commit f5ef338207
7 changed files with 72 additions and 18 deletions

View file

@ -12,7 +12,7 @@ mod.wizards.newContentElement.wizardItems {
}
}
menu {
show = menu_abstract
show = menu_abstract, menu_subpages
}
special {
show =
@ -26,6 +26,6 @@ mod.wizards.newContentElement.wizardItems {
}
TCEFORM.tt_content {
CType {
keepItems := addToList(text, image, menu_abstract)
keepItems := addToList(text, image, menu_abstract, menu_subpages)
}
}

View file

@ -0,0 +1,16 @@
tt_content.menu_subpages =< lib.contentElement
tt_content.menu_subpages {
templateName = MenuSubpages
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
special = directory
special.value.field = pages
levels = 3
}
}
stdWrap {
editIcons := appendString(header, header_layout, pages, layout)
}
}

View file

@ -0,0 +1,19 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<article>
{f:render(partial: 'BlogPostHeader', arguments: {
link: page.link,
title: page.title,
blogPost : page.data,
compatibleWith: page.compatibleWith,
topics: page.topics
})}
<main>
{page.data.abstract -> f:format.html(parseFuncTSPath: 'lib.parseFunc_abstract')}
</main>
<footer>
<p><a href="{page.link}">Read more …</a></p>
</footer>
</article>
</html>

View file

@ -1,19 +1,11 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<article>
{f:render(partial: 'BlogPostHeader', arguments: {
link: page.link,
title: page.title,
blogPost : page.data,
compatibleWith: page.compatibleWith,
topics: page.topics
})}
<li>
<a href="{page.link}">{page.title}</a>
<main>
{page.data.abstract -> f:format.html(parseFuncTSPath: 'lib.parseFunc_abstract')}
</main>
{page.data.abstract -> f:format.html(parseFuncTSPath: 'lib.parseFunc_abstract')}
<footer>
<p><a href="{page.link}">Read more …</a></p>
</footer>
</article>
<f:if condition="{page.children}">
{f:render(partial: 'Menu/Pages', arguments: {pages: page.children})}
</f:if>
</li>
</html>

View file

@ -0,0 +1,10 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
<ol>
<f:for each="{pages}" as="page">
{f:render(partial: 'Menu/Page', arguments: {page: page})}
</f:for>
</ol>
</html>

View file

@ -13,7 +13,7 @@
<f:section name="Content">
<f:for each="{menu}" as="page">
{f:render(partial: 'Menu/Page', arguments: {page: page})}
{f:render(partial: 'Menu/BlogPostAbstract', arguments: {page: page})}
</f:for>
</f:section>
</html>

View file

@ -0,0 +1,17 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
{f:layout(name: 'Default')}
<f:section name="Header">
{f:render(partial: 'Header', arguments: {
uid: data.uid,
layout: headerLayout,
header: '{data.header} {topic.0.data.title}'
})}
</f:section>
<f:section name="Content">
{f:render(partial: 'Menu/Pages', arguments: {pages: menu})}
</f:section>
</html>