diff Lib/IMPL/Web/View/TTDocument.pm @ 191:78a18a2b6266

IMPL::Web::View improvements (unstable)
author cin
date Thu, 05 Apr 2012 17:51:51 +0400
parents cd1ff7029a63
children a9faf883cdce
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm	Wed Apr 04 17:51:27 2012 +0400
+++ b/Lib/IMPL/Web/View/TTDocument.pm	Thu Apr 05 17:51:51 2012 +0400
@@ -46,6 +46,7 @@
 	});
 	
 	$this->templateVars('document', sub { $self } );
+	$this->InitInstance();
 }
 
 our %CTOR = (
@@ -80,8 +81,8 @@
 		my $path = $control;
 		if ( my $template = $this->loader->template($path) ) {
 
-			my $opts = { %{$this->opts} };
-			$opts->{STASH} = $this->stash->clone();
+			my $opts = { %{$this->loader->options} };
+			$opts->{STASH} = $this->loader->context->stash->clone();
  
 			my $ctx = new Template::Context($opts);
 			
@@ -115,7 +116,7 @@
 	
 	if ($this->layout) {
 		$output = $this->context->include(
-			$this->layout,
+			$this->loader->template($this->layout),
 			{
 				content => sub { $output ||= $this->RenderContent($args); }
 			}