[Neos] Neos Typo3.Form Node properties

Bastian Waidelich bastian at typo3.org
Tue Aug 5 19:31:40 CEST 2014


nikos wrote:

Hi Nikos,

> I am just wondering if it is possible to access Node properties from
> within a Form finisher? If it is possible are there any examples of use?

Reading this I remember that you asked something similar in May and I 
forgot to respond..

The only way I can think of right now would be to use the 
"overrideConfiguration" argument of the form:render ViewHelper to pass 
the node to the form runtime, for example:

<form:render persistenceIdentifier="{formIdentifier}" 
presetName="{presetName}" overrideConfiguration="{renderingOptions: 
{node: node}}" />

You can access it from the finisher via
$renderingOptions = 
$this->finisherContext->getFormRuntime()->getRenderingOptions();
$node = $renderingOptions['node'];

In order to adjust the template of the Form NodeType in Neos just copy 
the template[1] to your site package and adjust the template path:

prototype(TYPO3.Neos.NodeTypes:Form) {
	templatePath = 
'resource://<YourSitePackageKey>/Private/Templates/NodeTypes/Form.html'
}

..Or create a new NodeType.

HTH


[1] 
https://git.typo3.org/Packages/TYPO3.Neos.NodeTypes.git/blob/HEAD:/Resources/Private/Templates/NodeTypes/Form.html

-- 
Bastian Waidelich


More information about the Neos mailing list