-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Feature/rendering rework #16
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add missing CompileWithContentArgumentAndRenderStatic trait to ViewHelper class.
Move renderStatic method to AbstractGridViewHelper and implement only specific rendering in each grid ViewHelper.
The $contentArgumentName property was not properly set for the CompileWithContentArgumentAndRenderStatic. This caused the compile ViewHelper to use the first argument (which is not the content!) to be used as content. Regression of 063193f.
Integrate this service into the current grid ViewHelpers. Remove unused code from the ViewHelpers and update TypoScript as well as the default grid system templates.
Remove all unnecessary code from AbstractGridViewHelper.
The whole content records was wrongly assigned to this variable in 4ebbce6.
The grid template's row and column html now fully wraps its content. The template service provides methods to render only the row opening or closing html.
Implement new rendering logic in renderer class. The column rendering method now renders also the row opening and closing html before its content. This moved the state logic from the grid templates into the renderer class. Move render check from view helpers into renderer class.
The row should never be rendered as whole element but its opening or closing html can.
See the class' phpDoc for more information.
These ViewHelpers have to be used when defining the grid system rendering. The TemplateViewHelper will auto-generate two sections which will be compiled into the grid system template for the opening and closing row.
This ViewHelper should only render its content in the best performant way.
This ViewHelper is only required for the row content. Furthermore it is only used as a marker/placeholder. Therefore renamed the ViewHelper to better fit its purpose. Also update its usage and the default grid systems templates.
The compiled code must not be action terminated!
They will now be rendered the original way (of this PR): 1. The row section is rendered with a special marker (injected by the RowContentViewHelper). 2. The rendered HTML is then splitted (explode()) at the marker. 3. Both parts are saved to the cache and the requested rendered part is returned. This change requires an additional identifier parameter passed to the row parts rendering methods.
The parsing based row split, which compiled dynamic section on-parsing-time, does not work for nested ViewHelpers or partials. This commit squashes two revert commits: 1. Revert "Implement fluid template parser interceptor to emit PostParseEvent". This reverts commit 83e8134. 2. Revert "Implement templating ViewHelpers for grid templates". This reverts commit e61c639.
Its already injected through the GridRenderer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge until WIP status resolved!
When merged, it resolves #8
Changes of this PR will not be backwards compatible!
TODOs:
ViewHelperVariableContainer
for grid state (see Store grid rendering state in ViewHelperVariableContainer #15)file
option inFLUIDTEMPLATE
.Column
andRowEnd
sections are the same for all 3 grid systems, onlyRowBegin
changed. However they are included in each template file. Maybe extract them into partials?RowXXX
sections into a single section. This section will contain the row opening and closing html as well as the content. The content will be injected via aRenderableClosure
for lazy and cachable rendering of the inner content.StopCompilingException
to get the row opening tagsstdWrap.postUserFunc
of main rendering inPAGE
(see Use stdWrap.postUserFunc instead of ViewHelpers #9)Through TypoScript by providinglib.
functionsFLUIDGRID
) which extends theFLUIDTEMPLATE
object. This would smoothly work with a custom template view as explained above.\TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::initializeStandaloneViewInstance
can simply be overwritten to instantiate the custom view.