[TYPO3-mvc] best practise for teaser vs list?
ralph
77 at kubai.de
Fri Mar 26 16:04:28 CET 2010
thx.. you saved my day.. makes my controllers look a lot tidier then my
nasty workarounds i tried so far.
On 26.03.2010 15:51, Franz Koch wrote:
> Hi,
>
>> hi list, i wonder waht is the best practise for a teaser and list plugin.
>> i have to cols. one for the normal content, one col right. the old way
>> would be to use something like CMD=teaser and the send it to the right
>> function. how should i do it in extbase? send everything to index and
>> then..? redirect wouldn't work.. so how do i call the action depending
>> on a flexform field for example.
>
> in order to define the controller->action extbase should use from inside
> your flexform, all you have to do is to give the flexform field a
> special name: "switchableControllerActions". The value of this field
> will tell extbase which controller/action pair to use.
>
> Example:
>
> <switchableControllerActions>
> <TCEforms>
> <label>Possible actions</label>
> <config>
> <type>select</type>
> <maxitems>5</maxitems>
> <multiple>0</multiple>
> <size>5</size>
> <items>
> <numIndex index="0" type="array">
> <numIndex index="0">Action A</numIndex>
> <numIndex index="1">Controller1->action1</numIndex>
> </numIndex>
> <numIndex index="1" type="array">
> <numIndex index="0">Action B</numIndex>
> <numIndex index="1">Controller1->action2</numIndex>
> </numIndex>
> <numIndex index="2" type="array">
> <numIndex index="0">Multiple actions allowed</numIndex>
> <numIndex
> index="1">Controller1->action1,Controller1-action2,Controller2->action1</numIndex>
>
> </numIndex>
> </items>
> </config>
> </TCEforms>
> </switchableControllerActions>
>
>
More information about the TYPO3-project-typo3v4mvc
mailing list