Permalink
Browse files

Fixed render_template using wrong base_path

CiderCMS::View::Petal::render_template sometimes used the wrong base_path because the view's default config got added to the parameter hash after setting individual parameters, thus overwriting base_path. Fixed by moving it to the front where defaults belong.
  • Loading branch information...
Stefan Seifert
Stefan Seifert committed Jan 10, 2010
1 parent 980b316 commit dfe98c91e5a7c3944f700af34da42444990a2423
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/CiderCMS/View/Petal.pm
@@ -59,9 +59,9 @@ sub render_template {
my $instance = $c->stash->{instance};
my $template = Petal->new(
+ %{ $self->config },
base_dir => ["$root/instances/$instance/templates", "$root/templates"],
file => $stash->{template},
- %{ $self->config },
);
return $template->process({

0 comments on commit dfe98c9

Please sign in to comment.