Bug #52911

Fix PrimaryContent default TypoScript

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

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

100%


Description

The TYPO3.Neos:PrimaryContent TypoScript object is broken since no nodePath can be set easily by an integrator.

The API should be usable like this:

page.body.content.main = PrimaryContent
page.body.content.main.nodePath = 'main'

This needs a new TypoScript feature to allow properties on a Case object that are not used as matchers and results in the following TS:

prototype(TYPO3.Neos:PrimaryContent) < prototype(TYPO3.TypoScript:Case) {
        nodePath = 'to-be-defined-by-user'

        @override.nodePath = ${this.nodePath}
        @ignoreProperties = ${['nodePath']}
        default {
                prototype(TYPO3.Neos:ContentCollection) {
                    nodePath = ${nodePath}
                }
                condition = ${true}
                type = 'TYPO3.Neos:ContentCollection'
                @position = 'end'
        }
}

This will use the configured nodePath property on the PrimaryContent object and puts that into the context for rendering the matcher. The default matcher defines a nested prototype that assigns the nodePath from the context to the nodePath property of the ContentCollection.

Associated revisions

Revision 9d428443 (diff)
Added by Christopher Hlubek about 6 years ago

[BUGFIX] Make nodePath property configurable on PrimaryContent object

The PrimaryContent prototype is not easily usable after the refactoring
from PrimaryContentCollection.

This change allows to configure the nodePath on the PrimaryContent
object which will be used on the default ContentCollection to render
the correct nodes.

The rendering functional test is updated to include testing of the
PrimaryContent object.

Change-Id: Id1fe38441bc0a47f5ee563346620e19da490eb1e
Fixes: #52911
Reviewed-on: https://review.typo3.org/24863
Reviewed-by: Christopher Hlubek
Tested-by: Christopher Hlubek
Reviewed-by: Dominique Feyer
Tested-by: Dominique Feyer
Reviewed-by: Sebastian Kurfuerst
Tested-by: Sebastian Kurfuerst

History

#1 Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24863

#2 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24863

#3 Updated by Christopher Hlubek about 6 years ago

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

Also available in: Atom PDF