Search code examples
formstypo3fluidextbase

object to fluid.form on other page


Im trying to redirect from a list of entries to the edit page for these entries when an link.action is clicked.

I can't seem to get the values from the objects using the 'property' tag once I redirect to the editing page. The action 'edit' is not getting executed on the page I redirect to. Instead it fires the standard action which is just listing all the entries.

    public function toEditAction(Personenliste $person) {
        $this->redirect('edit', 'Listen', 'testprivateext', ['personenliste' => $person], 43);
    }

    public function editAction(Personenliste $person) {
        $this->view->assign('personenliste',$person);
        return $this->htmlResponse();
    }

The call is done via link.action. (I also tried directly redirecting the action with the 'pageUid'-tag)

<f:link.action action="toEdit" arguments="{person:'{person}'}" extensionName="testprivateext" controller="Listen" pluginName="pi1">&#128393</f:link.action>

Solution

  • This is not an answer to your question (because you already solved it), but a little info for more readable inline-fluid. This:

    arguments="{person:'{person}'}"
    

    can be written:

    arguments="{person: person}"
    

    when you directly pass a variable, you can discard the quotes and curly braces.

    but you will need it, when passing a VH:

    arguments="{person:'{person -> f:format.raw()}'}"
    

    Have a nice day :)