0

I am new to ZF2. I created one application based on the zf2 tutorial. In that i have layout.phtml in Application/view/layout folder and this is the header and footer in it aling with the content.Is there any function like for disabling my layout without the content.

4

2 に答える 2

2

レイアウトを無効にするコントローラーのアクションで、次のコードを使用します。

$viewModel = new ViewModel();
$viewModel->setTerminal(true);
return $viewModel;

これにより、レイアウトのないビューパーツのみが返されます。

詳細については、このリンクを確認してください。

于 2013-10-18T07:03:24.870 に答える