# HG changeset patch # User cin # Date 1365373127 -14400 # Node ID a5eb64c6e6f72447332d7f5904e4935f79015ef3 # Parent 673581380e794dcd926a9c4226959dfcf40557e1 TTDocument.GetTemplate corrected to work with document blocks diff -r 673581380e79 -r a5eb64c6e6f7 Lib/IMPL/Web/View/TTDocument.pm --- a/Lib/IMPL/Web/View/TTDocument.pm Mon Apr 01 00:41:48 2013 +0400 +++ b/Lib/IMPL/Web/View/TTDocument.pm Mon Apr 08 02:18:47 2013 +0400 @@ -88,7 +88,7 @@ $documentContext = _clone_context( $this->context ); $this->context->stash->set(require => $require); - $this->context->stash->set(document => sub { $self }); + $this->context->stash->set(document => sub { $self }); my $text = eval { @@ -135,6 +135,12 @@ } } +sub GetTemplate { + my ($this,$name) = @_; + + $this->template->blocks->{$name}; +} + sub _clone_context { my $args = { %{shift || {}} }; delete $args->{CONFIG};