Phalcon PhP - how to change the view dynamically

后端 未结 1 1079
无人及你
无人及你 2021-01-15 23:07

I\'m working in a website where part of it I have the static html, so I created a layout and in it I\'m inserting the static content using views. My problem is as this websi

相关标签:
1条回答
  • 2021-01-15 23:34

    To load a template you should use

    $this->view->setTemplateAfter('website');
    

    instead of $this->view->setLayout( 'website' );

    By using $this->view->pick('page/about'); you are overwriting the layout set by $this->view->setLayout( 'website' );, resulting in only seeing the page/about layout.

    0 讨论(0)
提交回复
热议问题