[TYPO3-mvc] controller and unique id
Christophe balisky
christophe at balisky.org
Mon Jul 20 09:58:05 CEST 2009
Steffen Ritter a écrit :
> Steffen Kamper schrieb:
>
>> automatic would be the best, but then the URIBuilder has to know the
>> controller id
>>
> Well we are about creating a news infrastructure... So why not
> introducing it. URIBUilder has to be invoked somewhere, right? So why
> not registering with it "the next task are done for id xyz".
> May be a constructor oder may ::initializeForId(xyz) which also may set
> other developerdesigned defaultpivars
>
> regards
>
> Steffen
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
>
>
There is a solution to this :
All PiVars and GP variables should be prefixed by the plugin Id (content
id of the plugin in the tt_content table).
Let's say I want to transfer 3 variables (controller, action and value
to a specific plugin in my page which holds 3 times the same plugin.
variable names should be : tx_extension
name_pi1[myPluginId][controller]=mycontroller&tx_extension
name_pi1[myPluginId][action]=myaction&tx_extension
name_pi1[myPluginId][value]=myValue.
When we read the PiVars you should check if tx_extension
name_pi1[myPluginId] is an array an override the nomal tx_extension
name_pi1[] array with their values.
In that manner if you send tx_extension
name_pi1[controller]=mycontroller&tx_extension
name_pi1[action]=myaction&tx_extension name_pi1[value]=myValue will get
the values and react to the action , and if you send tx_extension
name_pi1[myPluginId][controller]=mycontroller&tx_extension
name_pi1[myPluginId][action]=myaction&tx_extension
name_pi1[myPluginId][value]=myValue only the desired plugin
(id=pluginId) will react.
Any thoughts on this ?
More information about the TYPO3-project-typo3v4mvc
mailing list