Documentation · ViewHelper reference

XSD schema file | vhs 2.1.3

Once / InstanceViewHelper

Once: Instance

Displays nested content or "then" child once per instance of the content element or plugin being rendered, as identified by the contentObject UID (or globally if no contentObject is associated).

"Once"-style ViewHelpers are purposed to only display their nested content once per XYZ, where the XYZ depends on the specific type of ViewHelper (session, cookie etc).

In addition the ViewHelper is a ConditionViewHelper, which means you can utilize the f:then and f:else child nodes as well as the "then" and "else" arguments.

  • Tag usage example

    <v:once.instance then="[mixed]" else="[mixed]" identifier="NULL" lockToDomain="1" ttl="123">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:once.instance(then: [mixed], else: [mixed], identifier: 'NULL', lockToDomain: 1, ttl: 123)}


Argument Description Type

Value to be returned if the condition if not met.


Identity of this condition - if used in other places, the condition applies to the same identity in the storage (i.e. cookie name or session key)


If TRUE, locks this condition to a specific domain, i.e. the storage of $identity is associated with a domain. If same identity is also used without domain lock, it matches any domain locked condition


Value to be returned if the condition if met.


Time-to-live for skip registration, number of seconds. After this expires the registration is unset

Required attribute

Revision history

commit a91d4baa505c466cf42b205fd62ce07c460134da
Author: Claus Due <*****>
Date:   Sun Nov 25 15:48:54 2012 +0100

    [FEATURE] Once / Standard, Instance, Cookie and Session ViewHelpers

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

    [TASK] Happy new year!

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

    [TASK] CGL compliance

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

    [TASK] Switch to namespaces

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

    [TASK] Reference Copyright to file