Add content element MenuSubpages to create an overview of workshop
topics
This commit is contained in:
parent
a59b366bb8
commit
f5ef338207
7 changed files with 72 additions and 18 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
19
Resources/Private/Partials/Menu/BlogPostAbstract.html
Normal file
19
Resources/Private/Partials/Menu/BlogPostAbstract.html
Normal 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>
|
|
@ -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>
|
||||
|
|
10
Resources/Private/Partials/Menu/Pages.html
Normal file
10
Resources/Private/Partials/Menu/Pages.html
Normal 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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue