warning - Message
Extension Development, configuration of the extension
notice - Newer documentation available
notice - Draft
Configuration of the extension
Sometimes it is useful to configure some global variables like the upload path for the extension. To do so TYPO3 supports the configuration of the extension. See Comments in TypoScript Constants-field (TS-module)
In your extension create the file ext_conf_template and write:
# cat=basic; type=string; label= Upload Path uploadPath = uploads/tx_myextension
The first line is the configuration for the variable. The second line is the name of the variable (uploadPath) and the default value (uploads/tx_myextension).
During installation of your extension or later on you can enter and change the correct upload path, which is usually uploads/tx_myextension (like the default value). Don't forget to update the changes.
In main class of your extension you can access this configuration by:
$this->configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['xxxxx']);
where xxxxx is your extension key.
--Chibox 15:09, 12 February 2008 (CET)