[TYPO3-mvc] How to get to typoscipt ?
Dawid Pacholczyk
dpacholczyk at gmail.com
Wed Jan 12 13:28:07 CET 2011
W dniu 2011-01-12 13:21, Tim Schoch | GSTALTIG pisze:
> 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
>
Thanks I`ll check it but I can`t understand one thing.
I`ve created setup.txt similar to blog example
plugin.tx_multicontent.settings {
config {
extensions =
pids =
portalPid =
}
}
module.tx_blogexample {
settings < plugin.tx_multicontent.settings
}
So if I`m correct I should be able in my main template do something like
this
plugin.tx_multicontent.config.pirtalPid = 5
And it should be fetched in my module BUT the array isn`t visible :/
More information about the TYPO3-project-typo3v4mvc
mailing list