diff Lib/IMPL/Web/View/TTControl.pm @ 267:bbc0da7ef90e

*IMPL::Web::View refactoring
author cin
date Thu, 17 Jan 2013 02:39:44 +0400
parents 6b6d4b2275a1
children 86ff93b34f2a
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTControl.pm	Mon Jan 14 03:10:06 2013 +0400
+++ b/Lib/IMPL/Web/View/TTControl.pm	Thu Jan 17 02:39:44 2013 +0400
@@ -96,7 +96,7 @@
     }
 }
 
-sub GetRenderBlock {
+sub GetMainBlock {
     $_[0]->template->blocks->{RENDER} || $_[0]->template;
 }
 
@@ -105,13 +105,21 @@
     
     $args = {} unless ref $args eq 'HASH';
     
-    if(my $body = $this->GetRenderBlock ) {
+    if(my $body = $this->GetMainBlock ) {
         return $this->context->include( $body, { %$args, this => $this, template => $this->template } );
     } else {
         return "";
     }    
 }
 
+sub RenderBlock {
+    my ($this,$block, $args) = @_;
+    
+    $args = {} unless ref $args eq 'HASH';
+    
+    return $this->context->include( $block, { %$args, this => $this, template => $this->template } );
+}
+
 sub AUTOLOAD {
     our $AUTOLOAD;