DigiComp.FluidRenderFunctions/README.md
Ferdinand Kuhl 050e6e119f
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests/1 Pipeline was successful
ci/woodpecker/push/functional-tests/2 Pipeline was successful
ci/woodpecker/push/functional-tests/3 Pipeline was successful
ci/woodpecker/push/functional-tests/4 Pipeline was successful
storing the render function in ViewHelperVariableContainer
2024-06-02 04:04:48 +02:00

752 B

DigiComp.FluidRenderFunctions

This Package provides you with the possibility to register render functions, created from them, to use them dynamically else where.

Let me show you the idea:

<f:form.select options="{books}" />

Assuming you know how the SelectViewHelper works, you know, you can provide an "optionLabelField"-argument to adivce the ViewHelper to use a property of your options. But, what if you want to use a complete template, to display your books? FluidRenderFunctions to the rescue:

<rf:registerRenderFunction as="renderBook" subjectName="myBook">
    {myBook.name} from {myBook.author.name}
</rf:registerRenderFunction>
<f:form.select options="{books -> rf:applyRenderFunction(function: 'renderBook')}" />