]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC/View/TT.pm
Link to has-many objects in the view page.
[maypole.git] / lib / Apache / MVC / View / TT.pm
index 368c3ecc330546b01b42466788825ade02f16ddd..083b35950832d601ccc260ebb0c9f1d7568497d9 100644 (file)
@@ -27,12 +27,14 @@ sub _args {
         class   => $class,
         objects => $r->objects,
         base    => $r->config->{uri_base},
+        config  => $r->config
         # ...
     );
     $args{classmetadata} = {
         name => $class,
         columns => [ $class->columns ],
         colnames => { $class->column_names },
+        related_accessors => [ $class->related($r) ],
         moniker => $class->moniker,
         plural  => $class->plural_moniker,
         cgi => { $class->to_cgi },
@@ -45,6 +47,9 @@ sub _args {
     } else {
         ($args{$r->model_class->moniker}) = @{$r->objects};
     }
+
+    # Overrides
+    %args = (%args, %{$r->{template_args}||{}});
     %args;
 }