G
G
German Jet2016-12-06 22:51:02
Yii
German Jet, 2016-12-06 22:51:02

How to make two different layouts for basic template?

A question. How to make two different layouts for basic template? Those. unrelated to each other. One for the public part, the other for the private office.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-12-06
@GeraJet

Good evening.
The easiest option is to specify public $layout = 'layout_name'; in the personal account controller;
In the views/layouts directory, create two different layouts, one for the public part, the other for the private area.
You can also create a main layout, where there will be a common code for the rest of the layouts. You
can connect in secondary ones through

$this->beginContent('путь_к_главному_шаблону');
  // код шаблона для кабинета
$this->endContent();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question