[TYPO3-mvc] POST/GET vars

Dawid Pacholczyk dpacholczyk at gmail.com
Wed Oct 20 21:02:11 CEST 2010


That looks great but there is one problem for me. I can`t figure how to work
with ts configuration in extbase exts. I can`t find a good example cause in
blog_example isn`t too much of it.

I`ve create setup.txt with static ts like this

plugin.tx_myext.settings {
 something = 1
}

and I can get to something by $this->settings['something'] Everything is ok
with this BUT in blog_example there is something like

plugin.tx_myext.view - how can I get to this ?

Second question is

how should namespace look in ts config ?? SOmething like this ? ->
plugin.tx_myexet.view.Tx_MyExt_Domain_Model ??? or what it should be ?

Best regards,
Dawid Pacholczyk

2010/10/19 Bastian Waidelich <bastian at typo3.org>

> Dawid Pacholczyk wrote:
>
> Hi Dawid,
>
>  May I ask why you need to access global GET/POST vars?
>>>
>>
>  cause I want to make an extension that works on single view of another
>> extension.
>>
>
> I see. In that case you might want to try using the configurable plugin
> namespace that we introduced with three weeks ago [1].
>
> E.g. if you want to access tt_news parameters in your plugin, you could add
> plugin.tx_yourext_plugin.view.pluginNamespace = tx_ttnews
> (or "plugin.tx_yourext.view.pluginNamespace = tx_ttnews" if you want to
> change it for all plugins of the extension)
> to your TypoScript configuration in setup.txt.
>
> Then all tt_news parameters will be available in your plugin and you could
> e.g. have an action like this:
>
> /**
>  * @param integer $tt_news news article uid
>  * @return void
>  */
> public function indexAction($tt_news) {
>        debug($tt_news, 'current tt_news uid');
> }
>
> If you'd insert that plugin on your tt_news details page you should have
> the tt_news article uid available in $tt_news.
>
> BTW: If you have a domain model for tt_news records, you could even make
> use of the "PropertyMapper" that converts the uid to an object
> transparently:
>
> /**
>  * @param Tx_YourExt_Domain_Model_Article $tt_news The tt_news article
>  * @return void
>  */
> public function indexAction(Tx_YourExt_Domain_Model_Article $tt_news) {
>        debug($tt_news->getTitle(), 'current tt_news title');
> }
>
>
> HTH,
> Bastian
>
>
>
> [1] http://forge.typo3.org/projects/typo3v4-mvc/repository/revisions/2588
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>



-- 
Dawid Pacholczyk
tel: 502-054-334
gg: 5564051
skype: dpacholczyk
http://typo3blog.pl (only polish version at the moment)


More information about the TYPO3-project-typo3v4mvc mailing list