]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC/View/TT.pm
Allow template_args to add to and override template aguments.
[maypole.git] / lib / Apache / MVC / View / TT.pm
index f1b005e8108ac5a37260cdf2a77874b4bd235b08..e2a15046cef24e59743a7b9defc258b16f50132d 100644 (file)
@@ -26,6 +26,7 @@ sub _args {
         request => $r,
         class   => $class,
         objects => $r->objects,
+        base    => $r->config->{uri_base},
         # ...
     );
     $args{classmetadata} = {
@@ -44,6 +45,9 @@ sub _args {
     } else {
         ($args{$r->model_class->moniker}) = @{$r->objects};
     }
+
+    # Overrides
+    %args = (%args, %{$r->{template_args}||{}});
     %args;
 }