I would like to use a different template, a set of templates called Red, another set called read.
public function addData(){ $this->theme( 'red' )->display( 'form' ); $this->theme( 'read' )->display( 'addData' ); //这个使用了不同的模版文件, //但是他把不识别,还是从上一句的 red 模版找 addData.html 文件 ...}
Reply content:
I would like to use a different template, a set of templates called Red, another set called read.
public function addData(){ $this->theme( 'red' )->display( 'form' ); $this->theme( 'read' )->display( 'addData' ); //这个使用了不同的模版文件, //但是他把不识别,还是从上一句的 red 模版找 addData.html 文件 ...}
It's useless. In fact, you display inside the content directly with the stitching is not good. $this->display (folder + file), this way to render, you template folder is not the same, should be able to solve the problem.
Using AJAX asynchronous calls to assemble two templates into one
public function addData(){ $result = []; $result['red']= $this->fetch('Member:red'); $result['read']= $this->fetch('Member:read'); return $this->ajaxReturn($result);}