File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/Bridges/ApplicationLatte Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public static function install(Latte\Compiler $compiler)
4848 public function initialize ()
4949 {
5050 $ this ->getCompiler ()->addMethod ('getParentName ' , '
51- return !$this->getReferringTemplate() && $this->params["_control"] instanceof Nette\Application\UI\Presenter
51+ return $this->blocks && !$this->getReferringTemplate() && $this->params["_control"] instanceof Nette\Application\UI\Presenter
5252 ? $this->params["_control"]->findLayoutTemplateFile() : NULL;
5353 ' );
5454 }
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ $template = $latte->createTemplate(
2424 '' ,
2525 ['_control ' => new MockPresenter ]
2626);
27- Assert::same ( ' layout.latte ' , $ template ->getParentName ());
27+ Assert::null ( $ template ->getParentName ());
2828
2929$ template = $ latte ->createTemplate (
3030 '{block}...{/block} ' ,
3131 ['_control ' => new MockPresenter ]
3232);
33- Assert::same ( ' layout.latte ' , $ template ->getParentName ());
33+ Assert::null ( $ template ->getParentName ());
3434
3535$ template = $ latte ->createTemplate (
3636 '{block name}...{/block} ' ,
You can’t perform that action at this time.
0 commit comments