18 lines
750 B
Markdown
18 lines
750 B
Markdown
|
# 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)}" />
|
||
|
```
|