[TYPO3-dev] Environment constants

Vahan Amirbekyan vahan at ectostar.com
Thu Jan 17 21:43:50 CET 2008


hello folks,
I know this forum is for core developers but still might be of your interest 
and to a great help for users like me.

I have DEV, STG and PROD environments for my typo3 systems and use CVS.
There are many issues that exist in deployment typo3 systems across multiple 
environment.
Having an environment constant declared in localconf.php ( localconf.php is 
not in CVS ) helps.
For example emailredirect ext that was developed inhouse and will be put in 
public domain in very near future checks that constant value and it is not 
"PROD" redirects all emails generated by the system to specific list of 
emails addresses.
There are other cases when a constant like this one helps.
Some of typo3 extensions require domain records to be defined either as 
typo3 domain record or as a constant value. My environment constant values 
are "DEV" , "STG" and "PROD"
Domain names to systems deployed in corresponding environments are 
dev-my.domain.com, stg-my.domain.com and my.domain.com.
Changing typo3 domain records logic so that names get prefixed with env 
constant value + dash is a task of typo3 core developers but being able to 
read values of constants defined in localconf.php in typoscript code ( in 
template setup in particular ) hopefully something I could do on my own.
Can you tell me how to read in template setupvalue of
$TYPO3_CONF_VARS['SYS']['dgCommEnvironment'] ='DEV'; defined in 
localconf.php

thank you
Vahan

 





More information about the TYPO3-dev mailing list