Skip to content

Commit a9ffc9b

Browse files
committed
2 parents cfec992 + b7ab078 commit a9ffc9b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Structured Inline Editing for Neos CMS
2+
3+
Allows to reuse inspector editors inline. Hint: put all content-related properties inline and leave only metadata properties in the inspector.
4+
5+
![Demo](https://raw.githubusercontent.com/flowpack/Flowpack.StructuredEditing/master/structured.gif)
6+
7+
Getting started:
8+
9+
1. `composer require 'flowpack/structured-editing@dev'`
10+
2. Configure your nodetype properties to be inline editable like this:
11+
12+
```
13+
'Some.Node:Type'
14+
properties:
15+
date:
16+
type: DateTime
17+
defaultValue: now
18+
ui:
19+
label: Date
20+
reloadIfChanged: true
21+
inspector:
22+
group: news
23+
editorOptions:
24+
format: 'd-m-Y H:i'
25+
inline:
26+
editor: 'Flowpack.StructuredEditing/EditorEnvelope'
27+
editorOptions:
28+
format: 'd-m-Y H:i'
29+
editor: 'Neos.Neos/Inspector/Editors/DateTimeEditor'
30+
```
31+
32+
3. Render an editable annotation for this field, using usual `ContentElementEditable` annotation, which will be turned into the pencil edit icon:
33+
34+
```
35+
prototype(Some.Node:Type) < prototype(Neos.Fusion:Array) {
36+
dateEditable = ContentElementEditable {
37+
property = 'date'
38+
}
39+
date = ${Date.format(node.properties.date, 'd-m-Y')}
40+
@process.contentElementWrapping = ContentElementWrapping
41+
}
42+
```
43+
44+
**The concept behind this package will be merged back into the core once it matures, for now let's try it out in practice!**

structured.gif

4.53 MB
Loading

0 commit comments

Comments
 (0)