Mercurial > pub > Impl
changeset 303:a5eb64c6e6f7
TTDocument.GetTemplate corrected to work with document blocks
| author | cin | 
|---|---|
| date | Mon, 08 Apr 2013 02:18:47 +0400 | 
| parents | 673581380e79 | 
| children | 2ff513227cb4 | 
| files | Lib/IMPL/Web/View/TTDocument.pm | 
| diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] | 
line wrap: on
 line diff
--- 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};
