Skip to content

Commit

Permalink
TASK: Move blog and group documents to new nodetype group special
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Mar 9, 2023
1 parent 62f6167 commit 26211e5
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Configuration/Settings.Neos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ Neos:

nodeTypes:
groups:
special:
position: end 100
label: 'Neos.Demo:Main:nodeTypes.groups.special'
collapsed: false
forms:
position: end
position: end 200
label: 'Neos.Demo:Main:nodeTypes.groups.forms'
collapsed: false

Expand Down
3 changes: 3 additions & 0 deletions NodeTypes/Document/Blog/Blog.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ prototype(Neos.Demo:Document.Blog) < prototype(Neos.Demo:Document.LandingPage) {
}
}


# content is overwritten to render a list of cards for the latest 10 blog postings
content >
content = Neos.Fusion:Join {

intro = Neos.Fusion:Loop {
items = ${q(documentNode).children('[instanceof Neos.Demo:Document.BlogPosting]').sort("datePublished", "DESC").get()}
itemName = 'blogPosting'

# @todo the teaser should be made pretty and extracted as presentational component
itemRenderer = afx`
<Neos.Neos:NodeLink node={blogPosting}>
<Neos.Neos:ImageTag asset={q(blogPosting).property('image')} maximumWidth="200" maximumHeight="200" />
Expand Down
1 change: 1 addition & 0 deletions NodeTypes/Document/Blog/Blog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
label: i18n
icon: 'newspaper'
position: 300
group: special
help:
message: 'A blog'
constraints:
Expand Down
8 changes: 2 additions & 6 deletions NodeTypes/Document/Blog/BlogPosting.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ prototype(Neos.Demo:Document.BlogPosting) < prototype(Neos.Demo:Document.Page) {
content >
content = Neos.Fusion:Join {

image = Neos.Neos:ImageTag {
asset = ${q(node).property('image')}
maximumWidth = 1000
maximumHeight = 200
}

# @todo the intro should be made pretty and extracted as presentational component
intro = afx`
<Neos.Neos:ImageTag asset={q(node).property('image')} maximumWidth="1000" maximumHeight="200" />
<h1 class="text-center"><Neos.Neos:Editable property="headline" block={false} /></h1>
<p class="text-center"><Neos.Neos:Editable property="abstract" block={false} /></p>
<p class="text-center">{Date.format(q(node).property('datePublished'), 'd.m.Y')} - {q(node).property('authorName')}</p>
Expand Down
1 change: 1 addition & 0 deletions NodeTypes/Document/Blog/BlogPosting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
label: i18n
icon: 'file-alt'
position: 300
group: special
help:
message: 'A blog posting'
constraints:
Expand Down
1 change: 1 addition & 0 deletions NodeTypes/Document/Book/Book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
label: i18n
icon: 'book'
position: 300
group: special
help:
message: 'A book which can have chapters.'
constraints:
Expand Down
1 change: 1 addition & 0 deletions NodeTypes/Document/Chapter/Chapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
icon: 'bookmark'
help:
message: 'The Chapter node will work with all other chapter nodes on the same level to form a browsable book.'
group: special
inspector:
groups:
'document':
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<trans-unit id="nodeTypes.groups.forms" xml:space="preserve">
<source>Forms</source>
</trans-unit>
<trans-unit id="nodeTypes.groups.special" xml:space="preserve">
<source>Special</source>
</trans-unit>
<trans-unit id="splide.prev" xml:space="preserve">
<source>Previous slide</source>
</trans-unit>
Expand Down

0 comments on commit 26211e5

Please sign in to comment.