undkonsorten/typo3-getenv-modifier

Adds the new TypoScript modifier := getenv() for TYPO3 versions below 9.3

0.0.3 2019-11-12 11:43 UTC

This package is auto-updated.

Last update: 2021-04-12 15:02:17 UTC


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.