Documentation · ViewHelper reference

XSD schema file | vhs 2.1.3

Condition / Context / IsCliViewHelper

Condition: Is context CLI?

A condition ViewHelper which renders the then child if current context being rendered is CLI.


<!-- simple usage, content becomes then-child -->
    Hooray for CLI contexts!
<!-- extended use combined with f:then and f:else -->
       Hooray for CLI contexts!
       Maybe BE, maybe FE.
  • Tag usage example

    <v:condition.context.isCli then="[mixed]" else="[mixed]">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:condition.context.isCli(then: [mixed], else: [mixed])}


Argument Description Type

Value to be returned if the condition if not met.


Value to be returned if the condition if met.

Required attribute

Revision history

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

    [TASK] Switch to namespaces

commit 35093985593c408ed087e149990b3749624f870e
Author: Claus Due <*****>
Date:   Fri Oct 10 15:14:52 2014 +0200

    [TASK] Refactor and cover Condition / Context scope with tests

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

    [TASK] Reference Copyright to file