Feature #53321
Auto-generate TypoScript code for node types
Status: | Resolved | Start date: | 2013-11-04 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Christopher Hlubek | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
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
[!!!][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 over 1 year 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 over 1 year 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 over 1 year 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 over 1 year 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 over 1 year 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 over 1 year 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 over 1 year 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 over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 82dd00cee4c089d5fba85bc4f705bb577ba13d43.