Created
July 24, 2011 15:26
-
-
Save JanVoracek/1102727 to your computer and use it in GitHub Desktop.
Nette module routing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FrontModule; | |
class CenikPresenter extends BasePresenter | |
{ | |
public function renderDefault() | |
{ | |
$this->template->anyVariable = 'any value'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a n:href="Cenik:">Cenik</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment