File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ .. _frontend-integration :
2
+
3
+ ####################
4
+ Frontend integration
5
+ ####################
6
+
7
+ Generally speaking, django CMS is wholly frontend-agnostic. It doesn't care what your site's
8
+ frontend is built on or uses.
9
+
10
+ The exception to this is when editing your site, as the django CMS toolbar and editing controls
11
+ use their own frontend code, and this can sometimes affect or be affected by your site's code.
12
+
13
+ The content reloading introduced in django CMS 3.5 for plugin operations (when
14
+ moving/adding/deleting etc) pull markup changes from the server. This may require a JS widget to be
15
+ reinitialised, or additional CSS to be loaded, depending on your own frontend set-up.
16
+
17
+ For example, if using Less.js, you may notice that content loads without expected CSS after plugin saves.
18
+
19
+ In such a case, you can use the ``cms-content-refresh `` event to take care of that, by adding something like:
20
+
21
+ .. code-block :: html+django
22
+
23
+ {% if request.toolbar and request.toolbar.edit_mode_active %}
24
+ <script>
25
+ CMS.$(window).on('cms-content-refresh', function () {
26
+ less.refresh();
27
+ });
28
+ </script>
29
+ {% endif %}
30
+
31
+ after the toolbar JavaScript.
Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ concerned with explaining *how to do things* than with helping you understand
20
20
menu_system
21
21
commonly_used_plugins
22
22
searchdocs
23
+ frontend-integration
You can’t perform that action at this time.
0 commit comments