Django CMS 3 has two modes: structure and content.
I need to detect if the user is using one or the other in order to apply specific css.
Is there a way to to this?
You can detect the current mode via request.toolbar.build_mode
and request.toolbar.edit_mode
like this:
{% if request.toolbar.build_mode %}
We're in structure mode!
{% elif request.toolbar.edit_mode %}
We're in content mode !
{% else %}
We're not in edit mode!
{% endif %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With