From 27a14b52cea9dc31af37f4b040b8e2969551df61 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 10 Apr 2009 12:08:26 +0000 Subject: [PATCH] in ignore_layout case, do nothing special in BeforeTraverse hook. with this change, next/previous selection works fine, and redirection after changing id works fine etc. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26391 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/WebSite.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/WebSite.py b/product/ERP5/Document/WebSite.py index 3a7a8cd855..fcd57dfac6 100644 --- a/product/ERP5/Document/WebSite.py +++ b/product/ERP5/Document/WebSite.py @@ -63,6 +63,10 @@ class WebSiteTraversalHook(Persistent): # Only consider Web Site for absolute_url request = getattr(self, '_v_request', None) if request is None: request = self._v_request = get_request() + # In ignore_layout case, we only remove empty element from path + # XXX more support required for ignore_layout? + if request.get('ignore_layout', None): + return tuple([x for x in path if x]) website_path = request.get(WEBSITE_KEY, None) select_language = request.get(WEBSITE_LANGUAGE_KEY, None) if website_path: @@ -73,7 +77,6 @@ class WebSiteTraversalHook(Persistent): # Search for the common part index # XXX more testing should be added to check # if the URL is the kind of URL which is a Web Site - # XXX more support required for ignore_layout common_index = 0 i = 0 path_len = len(path) -- 2.30.9