Search code examples
typo3typo3-7.6.xrealurl

TYPO3 - Missing 'detail' path in own extension with list & detail view to deactivate in fixedPostVars of realurl


I've create a small extension with switchableControllerActions in a FlexForm for List & Detail View.

-Cars[12]
--Detail[19]

All actions (Car->list;Car->show;Car->new;Car->edit;Car->create;Car->update;Car->delete) are working ... yet when I hover hover the links in the list view or go in Detail View ... I'm missing the /cars/detail/... part of the link:

/cars/?tx_ffscarexample_carlist[car]=2&tx_ffscarexample_carlist[action]=show&tx_ffscarexample_carlist[controller]=Car&cHash=ab35fe1werwerssydsdf

What am I missing?


Solution

    1. By default Extbase uses the same page for every action, so you will stay on the page with the list view if you just put <f:link.action action="show" arguments="{car:car}">Link</f:link.action> in your Fluid template. You need to set the page uid where you want to show the detail view with <f:link.action action="show" pageUid="[uidOfTheDetailPage]" arguments="{car:car}">Link</f:link.action>

    2. To get rid of the additional /cars/ in the URL you need to use fixedPostVars instead of postVarSets. See: https://github.com/dmitryd/typo3-realurl/wiki/Configuration-reference#fixedpostvars