my $r = $self->routes;
# Default route
- $r->route('/:controller/:action/:id')->to('data#index', id => 1);
+ $r->route('/:controller/:action/:id')->to('data#index', id => 0);
# $self->plugin( 'request_timer' );
sub items {
my $self = shift;
+ if ( my $show = $self->param('id') ) {
+ $self->param('show', $show);
+ warn "show $show\n";
+ }
+
my $path = $self->session('path');
$self->redirect_to('/data/index') unless defined $loaded->{ $path };
% foreach my $show ( glob 'templates/data/items/*.html.ep' ) {
% $show =~ s{^.+/([^/]+)\.html\.ep$}{$1};
% my $class = session('show') eq $show ? 'class=active' : '';
-<a href="<%= url_for( controller => 'data', action => 'items' )->query( show => $show ) %>" <%= $class %>><%= $show %></a>
+<a href="<%= url_for( controller => 'data', action => 'items', id => $show ) %>" <%= $class %>><%= $show %></a>
% }
% if ( $self->can('_export_path') && glob $self->_export_path('*') ) {