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

Use stdWrap.postUserFunc instead of ViewHelpers #9

Open
jdoubleu opened this issue Aug 5, 2018 · 1 comment
Open

Use stdWrap.postUserFunc instead of ViewHelpers #9

jdoubleu opened this issue Aug 5, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@jdoubleu
Copy link

jdoubleu commented Aug 5, 2018

We are providing the RowWrap and ColumnWrap ViewHelpers to render additional grid system's html around each content element.
An integrator who wants to use this extension has to update the page rendering and the content element rendering by injecting these view helpers.
The integrator may also use them wrong and e.g. put additional html code between the row and the column which might break the grid system.
If the column wrap view helper was used several times inside one content element it might also break the grid system. Even worse: it breaks the html but the user doesn't notice because the browser corrects it.

For an out of the box solution I'd suggest to use the stdWrap.postUserFunc option in the content element rendering definition/configuration.

The FLUIDTEMPLATE content object has a stdWrap property.
For fluid_styled_content based rendering the function has to be added under lib.contentElement.stdWrap.postUserFunc.

This function would then handle the row and column rendering. It is called for each content element.

Please note, that the content element is already rendered before the row and column html are wrapped around it. If the content element needs to have the column context, a DataProcessor should be used.

What do you think @codemonkey1988 ?

@jdoubleu jdoubleu added the enhancement New feature or request label Aug 5, 2018
@codemonkey1988
Copy link
Contributor

Sounds like an improvement when when we can pull this out. It should stay easy to adapt changes to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants