DigiComp.FluidRenderFunctions/README.md
Ferdinand Kuhl 0de901d45c
Some checks failed
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests/1 Pipeline failed
ci/woodpecker/push/functional-tests/2 Pipeline failed
ci/woodpecker/push/functional-tests/3 Pipeline failed
ci/woodpecker/push/functional-tests/4 Pipeline failed
First working version
2024-06-01 23:15:35 +02:00

750 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)}" />