[TYPO3-mvc] Setting controller and action from URL

Jochen Rau jochen.rau at typoplanet.de
Mon May 10 09:39:17 CEST 2010


Hi Søren.

On 07.05.10 14:31, Søren Malling wrote:
> I've pasted the TypoScript i'm using to declare the page typeNum
>
> http://www.phlogi.net/f/t3/tsp/sp/-2f1d4da5b9/
>
> Line 23 + 24 isn't "activated" even though the controller and actions
> are entered in the url
>
> The meaning is, to get this working as a sort of "webservice"
>
> Hope someone can either tell me, that it's not possible to have more
> switchableControllerActions or tell me how to define them properly.
>
> Regards,
>
> Søren
>
> On Tue, May 4, 2010 at 3:18 PM, Søren Malling<soren.malling at gmail.com>  wrote:
>> Hi,
>>
>> I'm having this challenge with a "webservice" that I'm building.
>>
>> On a page I have the following TS
>>
>> http://www.phlogi.net/f/t3/tsp/sp/-a0b0621d78/
>>
>> I would expect that i could call the different controller and action
>> combination that I've defined through my url ex:
>>
>> index.php?id=226&type=1272963739&no_cache=1&tx_groupmembers_pi1[action]=edit&tx_groupmembers_pi1[controller]=District&tx_groupmembers_pi1[district]=6
>>
>> and this would run the editAction in my DistrictController.php file
>>
>> Unfortunately I get the following error returned
>>
>> An error occurred while trying to call
>> Tx_Ysmenmembers_Controller_Pi1Controller->editAction(). Error:
>> Required property 'member' does not exist.

The extension name "Ysmenmembers" in your class name doesn't match the 
extensionName in the TS. You either have to set the correct extension 
name in your f:link.action tag or you have to adapt your TS:

pluginName = Pi1
extensionName = GroupMembers
controller = JsonData
action = index		
switchableControllerActions {
	1.controller = JsonData
	1.actions = index,create,update,delete,read ////The dispatcher is not 
reacting if the above controller is set in the url and any of these 
actions aswell
}

Regards
Jochen

BTW clever solution to take the timestamp as typeNum






More information about the TYPO3-project-typo3v4mvc mailing list