V
V
Vyacheslav2018-03-31 09:28:08
Yii
Vyacheslav, 2018-03-31 09:28:08

Layout from database in yii2?

Hi all!
The question is
that I will have a lot of sub-sites in my system.
I would like to be able for each subsite:
1) to set its own layout
2) to set templates for the view
, and I would like to store this and that in the database under an identifier.
actually the question is, is it possible to change the layout and view, which are stored in the database and not in files, as originally in yii?
Of the documentation and Google are silent.
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-03-31
@slo_nik

Good morning.
Silent how to change the layout? Or maybe you just didn't understand the documentation?
If this is a module, then you can specify in the configuration which layout to use for which module.
You can set a separate layout for each controller
Are you storing html in a database?
There is a built-in twig template engine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question