Issue Bug Rejected

#94125Fluid f:render with argument "contentAs" does not work as expected

Gabriel Kaufmann TYPOworx GmbH | NewMedia 05/12/21, 09:33 updated 06/16/23, 11:45

Description

Fluid f:render with argument “contentAs” does not work as expected, as the documentation implies a delegation of the rendered content is always possible to use pre-rendered content in the given variable to output the contents using variable.

But this seems to be broken, as the variable is only set by using another rendering call or a delegate-class. There is no implicit call to VariableContainer setting the variable without these cases.

As known from other ViewHelpers a given “as” argument will return the content/result into that variable instead of implicit rendering.

*Usage cases*
would be to render a given wrapping HTML only in case the f:render will return a non-empty result.

+Code Reference+
https://github.com/TYPO3/Fluid/blob/fb42c02cb286f99ac677679f03280b2ad2d2b54e/src/ViewHelpers/RenderViewHelper.php#L145

Feature should be interesting for TYPO3 v9.5 upwards

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.