[TYPO3-mvc] How to get to typoscipt ?
Tim Schoch | GSTALTIG
tim.schoch at gstaltig.ch
Wed Jan 12 13:21:00 CET 2011
Hi
If you want to have access to your typoscript from everywhere in your code this snippet from my utility class could be what you're looking for:
/**
* get the typoscript settings
* @return mixed
*/
static function getFrameworkConfig() {
// get extension config
return Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();
}
You'll have to test it in the backend, as I'm only using it in the frontend.
Let me know if it works.
Tim
_____
From: Dawid Pacholczyk [mailto:dpacholczyk at gmail.com]
To: typo3-project-typo3v4mvc at lists.typo3.org
Sent: Wed, 12 Jan 2011 13:13:06 +0100
Subject: Re: [TYPO3-mvc] How to get to typoscipt ?
W dniu 2011-01-12 12:53, Franz Koch pisze:
> Hey,
>
>> I`ve just created new extension. I`ve modified setup.txt like this (just
>> for example)
>>
>> plugin.tx_multicontent.settings {
>> test = 1
>> }
>>
>> when i use this in controller $this->settings['test'] its empty.
>>
>> Even more
>>
>> print_r($this->settings) won`t do anything. Even won`t display an empty
>> array. What am I doing wrong?
>
> you have included your TypoScript template, have you? It's not loaded by
> default, so you have to include it manually. After that your settings
> should be there.
>
Yes I`ve added it to my main template.
I should probably also say that I`m trying to create a BE module for my ext.
Best regards,
Dawid Pacholczyk
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list