Answer the question
In order to leave comments, you need to log in
How to correctly implement sidebars in yii2?
Hello everyone, have a question about yii2? how to competently implement work with sidebars, let's say on the main page I want there to be no columns, but on others, and in order not to copy-paste the template, how to correctly prescribe the conditions for displaying the columns?
Answer the question
In order to leave comments, you need to log in
Maybe sidebars?
// views
$this->params['showSidebar'] = true;
// $this->params['showSidebar'] = false;
// layouts
if (isset($this->params['showSidebar']) && $this->params['showSidebar']) {
// show sidebar
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question