fluid - TYPO3 Extbase switchableControllerActions -
fluid - TYPO3 Extbase switchableControllerActions -
i have own extension has controller 2 actions: listaction , showaction. question: can display 2 actions @ same page.
at specific page i've created insert plugin record own plugin in flexform of backend configuration of plugin i've choosen "list action" via switchablecontrolleractions field. list action contains list of products link show action of product.
so want?
f.e. have page products. url example.com/products (here list action) , show action want url example.com/products/name-of-product
i've found extension functionality. it's gb_events. , noticed in switchablecontrolleractions field of flexform of plugin there this:
<switchablecontrolleractions> <tceforms> <label>lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions</label> <config> <type>select</type> <items type="array"> <numindex index="0" type="array"> <numindex index="0">lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions.upcoming</numindex> <numindex index="1">event->upcoming;event->list;event->calendar;event->show;event->export</numindex> </numindex> <numindex index="1" type="array"> <numindex index="0">lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions.list</numindex> <numindex index="1">event->list;event->upcoming;event->calendar;event->show;event->export</numindex> </numindex> <numindex index="2" type="array"> <numindex index="0">lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions.calendar</numindex> <numindex index="1">event->calendar;event->upcoming;event->list;event->show;event->export</numindex> </numindex> <numindex index="3" type="array"> <numindex index="0">lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions.details</numindex> <numindex index="1">event->show;event->list;event->upcoming;event->calendar;event->export</numindex> </numindex> </items> <maxitems>1</maxitems> <size>1</size> </config> <onchange>reload</onchange> </tceforms> </switchablecontrolleractions>
i've updated flexform configuration. still doesn't work. i've same list view after when click on link show action.
thanks in advance. appreciate help.
make sure have both, list , detail action in switchablecontrolleractions
so:
<numindex index="0" type="array"> <numindex index="0">lll:ext:gb_events/resources/private/language/locallang_db.xlf:flexform.default.switchablecontrolleractions.upcoming</numindex> <numindex index="1">event->list;event->calendar;event->show</numindex> </numindex>
then in typoscript template utilize status set controller / action based on detail uid:
[globalvar = gp:tx_myext_plugin|showuid > 0] config.defaultgetvars { tx_myext_plugin.action = show } [global]
to other controller parameter off url in realurl utilize this:
array( 'getvar' => 'tx_extkey_plugin[action]', 'nomatch' => 'bypass' ),
you can find more trick in high german article here
typo3 fluid extbase
Comments
Post a Comment