]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
fixed bug with multiple template roots in TT, fixed bug with frontpage path of /...
[maypole.git] / lib / Maypole.pm
index 4f4008500aa0ad94a916c311453591ab6fa073e3..858437e39fadc75d1a4ab6ea3543ab5be58f513d 100644 (file)
@@ -476,7 +476,6 @@ sub component {
 
     $self->get_user;
     my $url = URI->new($path);
-    warn "path : $path\n";
     $self->{path} = $url->path;
     $self->parse_path;
     $self->params( $url->query_form_hash );
@@ -986,10 +985,13 @@ sub parse_path
     # conditionally, broke lots of tests, hence this:
     $self->$_(undef) for qw/action table args/;
     $self->preprocess_path;
-    $self->path || $self->path('frontpage');
 
-    my @pi = grep {length} split '/', $self->path;
+    # use frontpage template for frontpage
+    unless ($self->path && $self->path ne '/') {
+      $self->path('frontpage');
+    }
 
+    my @pi = grep {length} split '/', $self->path;
 
     $self->table  || $self->table(shift @pi);
     $self->action || $self->action( shift @pi or 'index' );