Redirect latte problem, “No route for Dashboard:”

10 months ago

asinkan
Member | 28
+
0
-

Hi,

in my presenter, there is simple function:

public function pickChildFormSucceeded($button)
{
    $values = $button->getForm()->getValues();
    $name =  $values['child'];
    $this->flashMessage($name);
    $this->redirect('child_overview');

}

I prepared latte file child_overview.latte in app/presenters/templates/Dashboard

{block content}

<h1>Hello world</h1>

but when I click button and initiate that function I get error: No route for Dashboard:child_overview()
when I put $this->redirect(‘default’); it works fine. So did I forget to add child_overview.latte to some configuration file?

Thx

10 months ago

David Matějka
Moderator | 5696
+
+2
-

hi, a default route for an action parameter doesn't allow the underscore. I'd recommend you to use camel case naming instead – in your case childOverview