Matschess
(Matthias Lang)
February 20, 2019, 1:50pm
1
Hey there!
I have the property “headline” on my page document. When I want to render it, the element is editable but not saved. It seems that Neos doesn’t know where to save the variable, but it does get the right property…
Any suggestions?
My fusion:
body.content.headline = Neos.Neos:Content {
templatePath = ...
headline = ${q(node).property('headline')
}
My template:
{namespace neos=Neos\Neos\ViewHelpers}
<section class="headline">
{neos:contentElement.editable(property: 'headline', tag: 'h1')}
</section>
drillsgt
(Peter Rauber)
February 20, 2019, 2:18pm
2
Can you post your nodetype definition for that page nodetype?
Matschess
(Matthias Lang)
February 20, 2019, 4:11pm
3
Yes, sure.
Vendor.Name:Page
...
properties:
headline:
ui:
inlineEditable: true
inline:
editorOptions:
placeholder: 'Enter headline here'
drillsgt
(Peter Rauber)
February 21, 2019, 6:39am
4
Hm, looks ok to me. Don’t know if the type “string” should be there. In my page nodetype it looks the same (but I set the type also to string):
properties:
headline:
type: string
defaultValue: ''
ui:
inlineEditable: true
inline:
editorOptions:
placeholder: i18n
Matschess
(Matthias Lang)
February 21, 2019, 8:44am
5
Thanks @drillsgt ,
I just solved the problem. I was thinking a little bit dumb (shame on me).
The above fusion was just a cut-off. I saved the variable like this:
title = ${q(node).property('headline')
In the template I rendered:
{neos:contentElement.editable(property: 'title', tag: 'h1')}
I don’t know what the real problem was, but I think neos tried to save the variable to the property title, not to the variable.
Sorry for the missunderstanding…
Matthias