Feature #53321

Auto-generate TypoScript code for node types

Added by Christopher Hlubek almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Should have
Category:
-
Target version:
-
Start date:
2013-11-04
Due date:
% Done:

100%


Description

A new or changed node type needs an according change to the TypoScript code. To make this process as easy as possible the basic TypoScript code for rendering nodes should be auto-generated.

  • Reduce the overhead when implementing node types
  • Have extensible TypoScript objects per default, instead of using {node.properties.example} as a shortcut
  • No rendering errors because of missing TypoScript definitions

Associated revisions

Revision 82dd00ce (diff)
Added by Christopher Hlubek almost 6 years ago

[!!!][FEATURE] Auto-generate TypoScript from node type configuration

This change refactors the TypoScriptService for easier testing in the
RenderingTest and adds the feature of auto-generating TypoScript from the
node type configuration.

The generated code for node types is the following::

prototype(TYPO3.Neos.NodeTypes:Text) < prototype(TYPO3.Neos:Template) {
templatePath = 'resource://TYPO3.Neos.NodeTypes/Private/Templates/NodeTypes/Text.html'
text = ${node.properties.text}
}

This is non-breaking as long as the prototype for a node type does not
use Array or another TypoScript object, where the additional properties
of the auto-generated code could produce unwanted output during rendering.

For these cases it is sufficient to reset the prototype definition in
front of the custom declaration::

prototype(TYPO3.Neos:Page) >
prototype(TYPO3.Neos:Page) < prototype(TYPO3.TypoScript:Array) {
...
}

Due to the changed way of merging the TypoScript relative paths in
"include" statements might need to be changed. Relative paths are
always resolved from the directory of the current file.

Change-Id: If89c54a3e50f6c17f60b968abeb146daa1659bc4
Resolves: #53321
Reviewed-on: https://review.typo3.org/25161
Reviewed-by: Christopher Hlubek
Tested-by: Christopher Hlubek

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#2 Updated by Gerrit Code Review almost 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#3 Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#4 Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#5 Updated by Gerrit Code Review almost 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#6 Updated by Gerrit Code Review almost 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#7 Updated by Gerrit Code Review almost 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/25161

#8 Updated by Christopher Hlubek almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF