Skip to content
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

[BUGFIX] custom backend templates #577

Merged
merged 4 commits into from
Feb 28, 2025
Merged

Conversation

achimfritz
Copy link
Contributor

the container grid is not longer rendered after the content of the StandardContentRenderer but is assign as a variable "tx_container_grid" to the record.

this variable is used in a backend template:
<f:format.raw>{tx_container_grid}</f:format.raw>

container shipped the default backend template (again, we has dropped this in EXT:container 3.0)

in v12 and v13 the ContainerPreviewRenderer is no longer used we use PageContentPreviewRendering Event Listener instead of the ContainerPreviewRenderer
the Listener assigns the container grid to tx_container_grid

in v11 the PreviewRenderer is still used but assigns the grid as a variable instead of rendering the grid after the content

background: in v13 the Event Listener "FluidBasedContentPreviewRenderer" was introduced for rendering backend templates and "disables" StandardContentRenderer if a backend template is defined.

in addition with this change you can also render custom stuff in you backend template after the grid, which was not possible before

Fixes: #563

@achimfritz achimfritz requested a review from bmack January 30, 2025 11:23
the container grid is not longer rendered after the
content of the StandardContentRenderer but is assign
as a variable "tx_container_grid" to the record.

this variable is used in a backend template:
<f:format.raw>{tx_container_grid}</f:format.raw>

container shipped the default backend template (again, we has
dropped this in EXT:container 3.0)

in v12 and v13 the ContainerPreviewRenderer is no longer used
we use PageContentPreviewRendering Event Listener instead of
the ContainerPreviewRenderer
the Listener assigns the container grid to tx_container_grid

in v11 the PreviewRenderer is still used but assigns the
grid as a variable instead of rendering the grid after the content

background: in v13 the Event Listener "FluidBasedContentPreviewRenderer"
was introduced for rendering backend templates and "disables" StandardContentRenderer
if a backend template is defined.

in addition with this change you can also render custom stuff
in you backend template after the grid, which was not possible before

Fixes: #563
to not break the BeforeContainerPreviewIsRenderedEvent Method Signatures
we put the GridColumnItem into the runtime cache in the ContainerPreviewRenderer
renderPageModulePreviewHeader Method (which is always called) and fetch it in
the GridRenderer to pass it tho the Event.
This is a hack to not break the event, but fix the custom BackendTemplate usage
(s. dfc61c4)

Relates to: #563
@achimfritz achimfritz force-pushed the bugfix/backend-template-2 branch from 107c43e to d0919f4 Compare February 26, 2025 07:18
@achimfritz achimfritz merged commit 634c903 into master Feb 28, 2025
17 checks passed
@achimfritz achimfritz deleted the bugfix/backend-template-2 branch February 28, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Backend Template breaks content columns
2 participants