- Member | 9
Hello I've such thing in RouteFactory:
$router = new Route('[<presenter>[/<personUrl=>[/<action>[/<entryUrl=>]]]]', 'Homepage:default');
and I have routes:
But with this setup /poets and /poets/poet-url comes to same method, and
default.latte is rendered.
How can I easily have different lattes in this case? Such that not modify route implementation.
- Jan Tvrdík
- Nette guru | 2547
If can call
$this->setView('foo') in presenter to render
foo.latte instead of
default.latte or you can split
the one route into two:
$router = new Route('[<presenter>]', 'Homepage:default'); $router = new Route('<presenter>/<personUrl=>[/<action>[/<entryUrl=>]]', 'Poets:foo');
Okay thank you, I'll try.4 years ago