The idea is as follows: Sometimes I think the parameter in views is used to determine which layout should be used. How can this problem be solved? Frontendviewspagexxx. php $ this-& amp; gt; layout & #039; main & #039; error & amp; lt ;? Phpinclude (& quot; .. layoutsmain. php & quot ;);? & Amp; gt; what should I do when an error is reported ?... The idea is as follows:
Sometimes I think the parameter in views is used to determine which layout to use.
How can we do this?
Frontend/views/page/xxx. php
$this->layout='main';
Error
Error
What should we do?
The view inversion determines which layout to use. How can this problem be achieved?
Solution:
$this->context->layout='page';
Reply content:
The idea is as follows:
Sometimes I think the parameter in views is used to determine which layout to use.
How can we do this?
Frontend/views/page/xxx. php
$this->layout='main';
Error
Error
What should we do?
The view inversion determines which layout to use. How can this problem be achieved?
Solution:
$this->context->layout='page';
$this->content->layout = '@app/views/layouts/other.php';