diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml
index 14ea1b4d7e914e7fc262818909ab90087fdc42e9..c789f12ba7c1041104e9abccac49ace91e6e77fe 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/main_template.xml
@@ -54,8 +54,9 @@ IDEAS:\n
               layout_form_id         request/layout_form_id | here/getApplicableLayout | nothing;\n
               layout_form    python: layout_form_id and getattr(here, layout_form_id, None) or None;\n
               is_web_mode    python: (layout_form is not None) and (not ignore_layout);\n
-              editable_mode  python: (not is_web_mode) or request.get(\'editable_mode\', False);\n
-              editable_mode_backup editable_mode;\n
+              editable_mode  request/editable_mode | nothing;\n
+              dummy python: editable_mode is None and request.set(\'editable_mode\', (not is_web_mode));\n
+              editable_mode_backup request/editable_mode;\n
               dummy          python: request.set(\'editable_mode\', editable_mode);\n
               dummy          python: request.set(\'is_web_mode\', is_web_mode);\n
               page_template  python: is_web_mode and ((layout_form.meta_type==\'Page Template\' and layout_form.id) or getattr(layout_form, \'pt\', None)) or \'template_erp5_xhtml_style\';">\n
@@ -64,15 +65,14 @@ IDEAS:\n
           <tal:block metal:define-slot="context_bar" />\n
         </tal:block>\n
         <tal:block metal:fill-slot="main"\n
-                   tal:define="editable_mode  editable_mode_backup;\n
+                   tal:define="editable_mode editable_mode_backup;\n
                    dummy python: request.set(\'editable_mode\', editable_mode);">\n
           <tal:block metal:define-slot="main" />\n
         </tal:block>\n
       </tal:block>\n
     </tal:block>\n
   </tal:block>\n
-</tal:block>\n
-
+</tal:block>
 
 ]]></string> </value>
         </item>
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index 2a0f68ff7a955cea99c0c16c68d28163a406930e..c3398755eabd3b3f37f2732311a3e82c082ac675 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-899
\ No newline at end of file
+901
\ No newline at end of file