DigiComp.FluidRenderFunctions/README.md

18 lines
752 B
Markdown
Raw Normal View History

2024-06-01 23:15:35 +02:00
# 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:
```html
<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:
```html
<rf:registerRenderFunction as="renderBook" subjectName="myBook">
{myBook.name} from {myBook.author.name}
</rf:registerRenderFunction>
<f:form.select options="{books -> rf:applyRenderFunction(function: 'renderBook')}" />
2024-06-01 23:15:35 +02:00
```