undkonsorten / typo3-getenv-modifier
Adds the new TypoScript modifier := getenv() for TYPO3 versions below 9.3
Installs: 97
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- typo3/cms: ^6.2 || ^7.6 || ^8.7
Replaces
- getenv_modifier: 0.0.3
README
This extension provides a new value modifier := getEnv()
for
TypoScript syntax that reads environment variables
into TypoScript values.
Installation
Composer
composer require undkonsorten/typo3-getenv-modifier
TER (TYPO3 Extension Repository)
Just import extension getenv_modifier
in Extension Manager.
Git
# cd to typo3conf/ext
git clone https://github.com/undkonsorten/typo3-getenv-modifier.git getenv_modifier
Usage
Can be used in constants, setup and TSConfig (suggested usage in constants):
myConstant = defaultValue
# myConstant will be overridden if env var is defined at all.
# Empty env vars will override, too!
myConstant := getEnv(TYPO3_MY_CONSTANT)
Be sure to clear caches for changes in environment to take effect.