Add proper layout handling

Provide "normal" content pages.
This commit is contained in:
Daniel Siepmann 2020-01-27 13:27:21 +01:00
parent d9719e0519
commit 0cee75ceb5
10 changed files with 36 additions and 47 deletions

View file

@ -10,13 +10,17 @@ page {
bodyTagCObject = COA bodyTagCObject = COA
bodyTagCObject { bodyTagCObject {
10 = COA 10 = CASE
10 { 10 {
10 =< page.10.templateName.cObject key.stdWrap.cObject =< page.10.templateName.cObject
10.wrap = Layout| default = TEXT
wrap = class="|" default.value = BlogSidebar
Full = TEXT
Full.value = Content
BlogPost = TEXT
BlogPost.value = Content
} }
stdWrap.noTrimWrap = |<body |>| stdWrap.noTrimWrap = |<body class="Layout|">|
} }
10 = FLUIDTEMPLATE 10 = FLUIDTEMPLATE

View file

@ -1,7 +1,3 @@
@import 'EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript' @import 'EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript'
@import 'EXT:ds_site/Configuration/TypoScript/Setup/' @import 'EXT:ds_site/Configuration/TypoScript/Setup/'
@import 'EXT:ds_site/Configuration/TypoScript/Setup/ContentElements/' @import 'EXT:ds_site/Configuration/TypoScript/Setup/ContentElements/'
config {
admPanel = 1
}

View file

@ -1,29 +0,0 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
{f:render(partial: 'Header', arguments: _all) -> f:spaceless()}
<main>
<header>
<h1>Blog Post</h1>
</header>
<article>
{f:render(partial: 'BlogPostHeader', arguments: {
title: data.title,
blogPost : data,
compatibleWith: compatibleWith,
topics: assignedTopics,
addLinks: 1
}) -> f:spaceless()}
<aside>
{f:render(section: 'Aside', arguments: _all) -> f:spaceless()}
</aside>
{f:render(section: 'Content', arguments: _all)}
</article>
</main>
{f:render(partial: 'Footer', arguments: _all)}
</html>

View file

@ -5,10 +5,12 @@
<main> <main>
<header> <header>
<h1>{data.title}</h1> <h1>{f:render(section: 'Header', arguments: _all) -> f:spaceless()}</h1>
</header> </header>
<article> <article>
{f:render(section: 'ContentHeader', arguments: _all, optional: 1) -> f:spaceless()}
<aside> <aside>
{f:render(section: 'Aside', arguments: _all) -> f:spaceless()} {f:render(section: 'Aside', arguments: _all) -> f:spaceless()}
</aside> </aside>

View file

@ -2,7 +2,7 @@
@import "layout/header"; @import "layout/header";
@import "layout/footer"; @import "layout/footer";
@import "layout/content"; @import "layout/content";
@import "layout/page/blogPost-and-full"; @import "layout/page/content";
body { body {
@extend .container; @extend .container;

View file

@ -1,5 +1,4 @@
body.LayoutFull, body.LayoutContent {
body.LayoutBlogPost {
article { article {
@extend .row; @extend .row;
@extend .col-12; @extend .col-12;
@ -22,8 +21,7 @@ body.LayoutBlogPost {
} }
@media (max-width: 1023px) { @media (max-width: 1023px) {
body.LayoutFull, body.LayoutContent {
body.LayoutBlogPost {
article, article,
article > main { article > main {
padding-right: 0; padding-right: 0;

View file

@ -1,7 +1,21 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" <html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"> data-namespace-typo3-fluid="true">
<f:layout name="BlogPost" /> <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"> <f:section name="Content">
<main> <main>

View file

@ -1,7 +1,7 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" <html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"> data-namespace-typo3-fluid="true">
<f:layout name="Default" /> <f:layout name="BlogSidebar" />
<f:section name="Content"> <f:section name="Content">
{contentMain -> f:format.raw()} {contentMain -> f:format.raw()}

View file

@ -1,7 +1,11 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" <html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"> data-namespace-typo3-fluid="true">
<f:layout name="Full" /> <f:layout name="Content" />
<f:section name="Header">
{data.title}
</f:section>
<f:section name="Content"> <f:section name="Content">
<main>{contentMain -> f:format.raw()}</main> <main>{contentMain -> f:format.raw()}</main>