-
-
Save anonymous/00a0481779489d9a840c to your computer and use it in GitHub Desktop.
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
sub _routes { | |
my ( $self ) = @_; | |
my $r = $self->routes; | |
# when meta- and languagedata are given, set default route | |
if ( %{ $self->app->_metadata } && %{ $self->app->_language } ) { | |
$r->route( '/' )->to( controller => 'catalog', action => 'index', category => '', subcategory => '' ); | |
$r->route( '/catalog' )->to( controller => 'catalog', action => 'index', category => '', subcategory => '' ); | |
$r->route( '/catalog/index' ) | |
->to( controller => 'catalog', action => 'index', category => '', subcategory => '' ); | |
$r->route( '*' )->to( 'controller' => 'catalog', 'action' => 'index_404', category => '', subcategory => '' ); | |
# $r->route('*')->to( 'controller' => 'mister', 'action' => 'minute'); | |
} | |
else { | |
$r->route( '*' )->to( | |
'controller' => 'catalog', | |
'action' => 'error_no_metadata', | |
); | |
} | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment