From 540c5b1501986f7dd37a53c9c1b6af46381d45a8 Mon Sep 17 00:00:00 2001 From: Yuri Date: Wed, 12 Jun 2019 15:52:50 +0300 Subject: [PATCH 1/2] TASK: add last materials --- .../Private/Fusion/NodeTypes/PageMain.fusion | 81 +++++++++++-------- .../Fusion/NodeTypes/Repository.fusion | 4 +- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/DistributionPackages/Sfi.Kateheo/Resources/Private/Fusion/NodeTypes/PageMain.fusion b/DistributionPackages/Sfi.Kateheo/Resources/Private/Fusion/NodeTypes/PageMain.fusion index b1af2c0..9ac20c1 100755 --- a/DistributionPackages/Sfi.Kateheo/Resources/Private/Fusion/NodeTypes/PageMain.fusion +++ b/DistributionPackages/Sfi.Kateheo/Resources/Private/Fusion/NodeTypes/PageMain.fusion @@ -1,3 +1,37 @@ +prototype(Sfi.Kateheo:AbstractList) < prototype(Flowpack.Listable:Collection) { + @process.styles = ${'' + value} + listClass = 'newsList' + itemClass = 'newsList-item' + itemRenderer = Flowpack.Listable:ContentCaseShort + collection = Neos.Neos:ContentCollection +} + + prototype(Sfi.Kateheo:PageMain) < prototype(Sfi.Kateheo:AbstractDocument) { prototype(Psmb.Carousel:Carousel).@process.wrap = afx`
{value}
` body.content = Neos.Fusion:Component { @@ -9,39 +43,14 @@ prototype(Sfi.Kateheo:PageMain) < prototype(Sfi.Kateheo:AbstractDocument) { mode = 'front' } - newsList = Flowpack.Listable:Collection { - @process.styles = ${'' + value} - listClass = 'newsList' - itemClass = 'newsList-item' - itemRenderer = Flowpack.Listable:ContentCaseShort + newsList = Sfi.Kateheo:AbstractList { collection = ${Search.query(site).nodeType("Sfi.Kateheo:News").sortDesc('date').from(0).limit(4).execute().toArray()} } + lastAdded = Sfi.Kateheo:AbstractList { + collection = ${Search.query(site).nodeType("Sfi.Kateheo:Article").sortDesc('date').from(0).limit(6).execute().toArray()} + } + soundCloudPlayer = Sfi.Kateheo:SoundCloudPlayer { soundCloudLink = ${site.properties.soundCloudLink} } @@ -63,6 +72,13 @@ prototype(Sfi.Kateheo:PageMain) < prototype(Sfi.Kateheo:AbstractDocument) { {props.main}
{props.primarySections}
+

Последние материалы сайта

+ {props.lastAdded} +

Новости

+ {props.newsList} +
+ Архив всех материалов сайта › +
@@ -77,11 +93,6 @@ prototype(Sfi.Kateheo:PageMain) < prototype(Sfi.Kateheo:AbstractDocument) {
-

Новости

- {props.newsList} -
- Архив всех материалов сайта › -
` style = ${'