From df2ec7d40986773da037e7f183ed5c35183bf448 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Ninivin?= <cedric.leninivin@tiolive.com>
Date: Fri, 31 Mar 2017 15:12:36 +0000
Subject: [PATCH] erp5_web_renderjs_ui: Have default Page renderer use
 TypeBaseMethod for default page

---
 .../WebSection_renderDefaultPageAsGadget.py                 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
index 44306533c8..6fc91c1b6b 100644
--- a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
+++ b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
@@ -26,7 +26,11 @@ for language in available_language_set:
   else:
     website_url_set[language]=  re.sub(website_url_pattern, r'%s/%s/\1' % (root_website_url, language), web_section.absolute_url())
 
-return default_web_page.WebPage_viewAsWeb(mapping_dict={
+view_as_web_method = default_web_page.getTypeBasedMethod(
+  "viewAsWeb",
+  fallback_script_id="WebPage_viewAsWeb"
+  )
+return view_as_web_method(mapping_dict={
   "frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default="worklist"),
   "application_title": web_section.getLayoutProperty("configuration_application_title", default="ERP5"),
   "action_view": web_section.getLayoutProperty("configuration_view_action_category", default="object_view"),
-- 
2.30.9