Documentation · ViewHelper reference

XSD schema file | vhs master

Render / InlineViewHelper

Render: Inline

Render as string containing Fluid as if it were part of the template currently being rendered.

Environment (template variables etc.) is cloned but not re-merged after rendering, which means that any and all changes in variables that happen while rendering this inline code will be destroyed after sub-rendering is finished. /

  • Tag usage example

    <v:render.inline onError="NULL" graceful="1" content="NULL" namespaces="{foo: 'bar'}">
    	<!-- tag content - may be ignored! -->
    </v:render.inline>
  • Inline usage example

    {v:render.inline(onError: 'NULL', graceful: 1, content: 'NULL', namespaces: {foo: 'bar'})}

Arguments

Argument Description Type
content

Template code to render as Fluid (usually from a variable)

string
graceful

If forced to FALSE, errors are not caught but rather "transmitted" as every other error would be

boolean
namespaces

Optional additional/overridden namespaces, ["ns" => "MyVendor\MyExt\ViewHelpers"]

array
onError

Optional error message to display if error occur while rendering. If NULL, lets the error Exception pass trough (and break rendering)

string
Required attribute

Revision history

commit c371f49d5a48a505c9b7b8424fe746c6e96826e7
Author: Claus Due <*****@wildside.dk>
Date:   Wed Nov 7 16:29:35 2012 +0100

    [FEATURE] Render ViewHelper, Inline Fluid
    
    Renders Fluid code which would otherwise not be rendered (i.e. code
    stored in a variable) as if it were part of the current template.

commit 9fcb517fe8dd55c41ca67a1c2d18c3ff9d718c4a
Author: Claus Due <*****@wildside.dk>
Date:   Fri Nov 9 13:48:46 2012 +0100

    [WIP] Inline Fluid Render ViewHelper

commit 07090cf53c71cf8eb73b32a951340689bc8f6e93
Author: Claus Due <*****@wildside.dk>
Date:   Sat Nov 10 14:02:04 2012 +0100

    [TASK] Add getter for uncloned View, AbstractRenderViewHelper

commit 1c87322d3a4f2ffe7c45e48bb0547e4f577d391f
Author: Claus Due <*****@wildside.dk>
Date:   Sat Jan 26 15:40:27 2013 +0100

    [DOC] Doc comment for Render / Inline ViewHelper

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file