diff --git a/themes/grav/js/pages-all.js b/themes/grav/js/pages-all.js index 835f4ca8..204345e0 100644 --- a/themes/grav/js/pages-all.js +++ b/themes/grav/js/pages-all.js @@ -44,11 +44,12 @@ $(function(){ }); $("#admin-mode-toggle input[name=mode-switch]").on('change', function(e){ - var value = $(this).val(); + var value = $(this).val(), + uri = $(this).data('leave-url'); if (currentValues == getState()) { setTimeout(function(){ - window.location.href = '{{ uri.route(true) }}' + ((value == 'expert') ? '/expert:1' : ''); + window.location.href = uri; }, 200) return true; diff --git a/themes/grav/templates/pages.html.twig b/themes/grav/templates/pages.html.twig index 8636c5e8..38db503f 100644 --- a/themes/grav/templates/pages.html.twig +++ b/themes/grav/templates/pages.html.twig @@ -98,9 +98,9 @@ {% if context.blueprints.fields %}
- + - +