Feb 11, 2015 Tag: TYPO3

TYPO3 TypoScript Tricks

How to test whether an extension is loaded in a TypoScript condition.

Updated on Jun 01, 2016

Test: Extension is loaded?

A TypoScript condition to test whether a specific extension is loaded:

[userFunc = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('extkey')]
   # more to do ...
[global]

See Forge:#19739, Condition Reference

Note that this test does not necessarily garantee that the extension is doing something on a special page or in a special situation.

Test: Extension defines TypoScript?

It may be better to check whether a special TypoScript value is set to test whether an extension “is active”. If the extension is in your hands make it set a TypoScript constant:

plugin.tx_MYEXT.active = 1

Then test with globalVar:

[globalVar = LIT: {$plugin.tx_MYEXT.active} > 0]
   # yeah, MYEXT is loaded and active
[else]
   # if not ...
[global]

Previous topic

Linklist Web Development

Next topic

Send JSON from Fluid to JQuery

Tags

Archives

Languages

Recent Posts

This Page