2017 © Pedro Peláez
 

typo3-cms-extension getenv-typoscript

This TYPO3 extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available.

image

h4ck3r31/getenv-typoscript

This TYPO3 extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available.

  • Wednesday, August 16, 2017
  • by ohader
  • Repository
  • 1 Watchers
  • 1 Stars
  • 281 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

TYPO3 Extension getenv_typoscript

Description

This extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available. For instance on TEXT cObjects page.10.data = getenv:MY_ENV_VARIABLE works out of the box even without this extension. For scenarios where stdWrap is not available, this extension kicks in and allows to bridge the gap by using the getenv TypoScript modifier., (*1)

General usage: property := getenv(MY_ENV_VARIABLE), (*2)

Examples

The following example overrides TYPO3's baseUrl setting which does not support stdWrap out of the box and thus allows to make the setting more dynamic., (*3)

config.baseURL = getenv(MY_BASE_URL)

The next example allows to configure Solr server settings in TypoScript which as well don't support stdWrap., (*4)

plugin {
    tx_solr {
        solr {
            host := getenv(T3_SOLR_HOST)
            port := getenv(T3_SOLR_PORT)
            path := getenv(T3_SOLR_PATH)
            username := getenv(T3_SOLR_USERNAME)
            password := getenv(T3_SOLR_PASSWORD)
        }
    }
}

Installation

composer require h4ck3r31/getenv-typoscript

or, (*5)

cd typo3conf/ext/
git clone https://github.com/ohader/getenv_typoscript.git

Once the sources are available, the extension has to be enabled, e.g. using the Extension Manager or making use of TYPO3 Console., (*6)

The Versions

16/08 2017

dev-master

9999999-dev

This TYPO3 extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available.

  Sources   Download

GPL-2.0+

The Requires

 

16/08 2017

v1.0.1

1.0.1.0

This TYPO3 extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available.

  Sources   Download

GPL-2.0+

The Requires

 

21/07 2017

v1.0.0

1.0.0.0

This TYPO3 extension provides a simple way to access environment variables within TypoScript at places where stdWrap is not available.

  Sources   Download

GPL-2.0+

The Requires