A
A
Alexander Sinitsyn2016-09-03 11:46:32
Yii
Alexander Sinitsyn, 2016-09-03 11:46:32

What is the best way to switch layout for guests and authorized users?

It is necessary to display one template for guests, and another for users. I'm thinking of making a BaseController in which, through init(), check isGuest() with setting the desired $layout value and inherit the rest of the controllers from it. Is this correct or are there other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
enchikiben, 2016-09-03
@a_u_sinitsin

right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question