Feb 11, 2015 Tag: TYPO3
How to test whether an extension is loaded in a TypoScript condition.
Updated on Jun 01, 2016
See also
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.
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]