Kcko
3/18/2015 - 2:21 PM

Nette - routování - překladová tabulka

Nette - routování - překladová tabulka

<?php


$router[] = new Route('<presenter galerie|blog|novinky|ubytovani>/<action>[/<id>]', array(
                    'presenter' => array(
                        Route::FILTER_TABLE => array(
                            // řetězec v URL => presenter
                            'galerie' => 'Gallery',
                            'blog' => 'Blog',
                            'novinky' => 'News',
                            'ubytovani' => 'Accommodation'
                        )),
                    'action'    => 'default'
                ));
                $router[] = new Route('<presenter>/<action>[/<id>]', array(
                    'presenter' => 'Page',
                    'action'    => 'default'
                ));