Skip to content

Instantly share code, notes, and snippets.

@JanVoracek
Created July 24, 2011 15:26
Show Gist options
  • Save JanVoracek/1102727 to your computer and use it in GitHub Desktop.
Save JanVoracek/1102727 to your computer and use it in GitHub Desktop.
Nette module routing
$router[] = new Route('index.php', 'Front:Homepage:default', Route::ONE_WAY);
$router[] = new Route('admin/<presenter>/<action>[/<id>]', array('module'=>'Admin','presenter'=>'Homepage','action'=>'default'));
$router[] = new Route('<presenter>/<action>[/<id>]', array('module'=>'Front', 'presenter'=>'Homepage','action'=>'default'));
namespace FrontModule;
class CenikPresenter extends BasePresenter
{
public function renderDefault()
{
$this->template->anyVariable = 'any value';
}
}
<a n:href="Cenik:">Cenik</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment