Redirect latte problem, “No route for Dashboard:”

asinkan
Member | 38
+
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

David Matějka
Moderator | 6445
+
+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