[TYPO3-english] Get Typoscript from an action controller (Typo3 6.2)

Sergio Catalá scatala.enet at gmail.com
Wed Jan 14 16:28:34 CET 2015

Hi list,

I've been using this function until now to get the value of a TS constant
from a function of an ActionController (Extbase):

    public function getTyposcriptConstantByKey($key) {

        require_once(PATH_t3lib . 'class.t3lib_tstemplate.php');
        require_once(PATH_t3lib . 'class.t3lib_page.php');

        // Initialize the page selector
        $sysPage =

        // Initialize the TS template
        $template =

        // Avoid an error
        $template->tt_track = 0;

        // Get rootline for current PID
        $rootline = $sysPage->getRootLine(1);

        // Start TS template

        // Generate config

        $constants = $template->flatSetup;

        return $constants[$key];

After upgrading to Typo3 6.2, these libs don't exist anymore. Any
suggestion to get the Typoscript from a function?

Thanks in advance,

More information about the TYPO3-english mailing list