ViewHelper Documentation
render
A ViewHelper to render a section, a partial, a specified section in a partial or a delegate ParsedTemplateInterface implementation.
= Examples =
<f:render partial="SomePartial" arguments="{foo: someVariable}" />
<f:section name="someSection">This is a section. {foo}</f:section>
<f:render section="someSection" arguments="{foo: someVariable}" />
<f:section name="mySection">
<f:for each="{myMenu}" as="menuItem">
<li>
{menuItem.text}
<f:if condition="{menuItem.subItems}">
<f:render section="mySection" arguments="{myMenu: menuItem.subItems}" />
</f:if>
</li>
</f:for> </f:section> <f:render section="mySection" arguments="{myMenu: menu}" />
<ul>
<li>menu1a</li>
<li>menu1b</li>
</ul>
[...] (depending on the value of {menu})
<f:render partial="somePartial" arguments="{_all}" />
<f:render delegate="My\Special\ParsedTemplateImplementation" arguments="{_all}" />
Arguments
section string, required
Section to render - combine with partial to render section in partial
partial string, required
Partial to render, with or without section
delegate string, required
Optional PHP class name of a permanent, included-in-app ParsedTemplateInterface implementation to override partial/section
arguments anySimpleType, required
Array of variables to be transferred. Use {_all} for all variables
optional boolean, required
If TRUE, considers the *section* optional. Partial never is.
default anySimpleType, required
Value (usually string) to be displayed if the section or partial does not exist
contentAs string, required
If used, renders the child content and adds it as a template variable with this name for use in the partial/section