I
I
IvanOne2015-12-01 08:37:57
Django
IvanOne, 2015-12-01 08:37:57

How to implement multi templates in django cms?

There is django cms 3.2, it is necessary to make it so that it would be possible to easily change the themes of the site, everything is clear with the templates, but what about plugins and your own app, one solution for each theme of the site to write your own templates for plugins and applications, and when initialization, write the desired path to the template, but I can’t figure out how to get the template used in the view, or the option to specify the theme in the settings, and, depending on this setting, again substitute the template. Share ideas. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-12-01
@IvanOne

Something tells me what to do from Django vp is not a very good idea
. All changes will take a couple of minutes for a knowledgeable person, and for an unknowing person you will have to write a bunch of checks and unnecessary code.
View should not know anything about the template, except for its name.
In settings, specify the folder with "pattern block" aka theme

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question