Mercurial > pub > Impl
diff Lib/IMPL/Web/View/TTDocument.pm @ 286:d357b5d85d25
*TTView refactoring
author | sergey |
---|---|
date | Mon, 18 Feb 2013 14:46:06 +0400 |
parents | 546957c50a36 |
children | 2d253e6e4a88 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm Mon Feb 18 02:55:59 2013 +0400 +++ b/Lib/IMPL/Web/View/TTDocument.pm Mon Feb 18 14:46:06 2013 +0400 @@ -101,8 +101,6 @@ Loader->safe->Require($template->class); } - my @parts = split(/\/+/,$control); - $this->controls->{$control} = $factory; return $factory; @@ -121,8 +119,21 @@ my $newArgs = hashMerge($this->creationArgs, $args); if ($this->layout) { + my $tlayout = $this->loader->layout($this->layout); + if(my $init = $tlayout->blocks->{INIT}) { + $this->context->process( + $init, + hashMerge( + $newArgs, + { + this => $this, + template => $this->template + } + ) + ); + } return $this->context->include( - $this->loader->layout($this->layout), + $tlayout, { %{$newArgs}, content => $this->RenderContent($newArgs),