Documentation · ViewHelper reference

XSD schema file | vhs master

Extension / LoadedViewHelper

Extension: Loaded (Condition) ViewHelper

Condition to check if an extension is loaded.

Example:

{v:extension.loaded(extensionName: 'news', then: 'yes', else: 'no')}

<v:extension.loaded extensionName="news">
    ...
</v:extension.loaded>

/

  • Tag usage example

    <v:extension.loaded then="[mixed]" else="[mixed]" condition="1" extensionName="NULL">
    	<!-- tag content - may be ignored! -->
    </v:extension.loaded>
  • Inline usage example

    {v:extension.loaded(then: [mixed], else: [mixed], condition: 1, extensionName: 'NULL')}

Arguments

Argument Description Type
condition

Condition expression conforming to Fluid boolean rules

boolean
else

Value to be returned if the condition if not met.

mixed
extensionName

Name of extension that must be loaded in order to evaluate as TRUE, UpperCamelCase

string
then

Value to be returned if the condition if met.

mixed
Required attribute

Revision history

commit dbf27436aceba79b309ca64d0a03fd317b854226
Author: Claus Due <*****@wildside.dk>
Date:   Fri Nov 2 16:25:28 2012 +0100

    [FEATURE] Extension ViewHelpers
    
    Includes: Absolute, Relative, SiteRelative and Resource path
    ViewHelpers to resolve paths, and Loaded condition ViewHelper to check
    if an extension (by UpperCamelCase name) is loaded.

commit 23ecae109ef0e36325a25fc37de0bd431b15a5ad
Author: Claus Due <*****@wildside.dk>
Date:   Mon Feb 4 22:41:02 2013 +0100

    [DOC] Doc comments for Extension / Icon and Loaded ViewHelpers

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

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

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