Commit 6f598fdc authored by Jean-Paul Smets's avatar Jean-Paul Smets

Fixed URL generation inside domains.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11914 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 94cf3831
......@@ -93,8 +93,11 @@ class Domain(Predicate, MetaNode, MetaResource):
We must eliminate portal_categories in the RelativeUrl
since it is never present in the category list
"""
return '/'.join(self.portal_url.getRelativeContentPath(self)[1:])
content_path = self.portal_url.getRelativeContentPath(self)
if content_path[0] == 'portal_categories':
return '/'.join(content_path[1:])
return '/'.join(content_path)
# Generator API
# How to define a generated subdomain
......
......@@ -484,7 +484,10 @@ class Predicate(Folder):
looking up methods named ${PortalType}_asPredicate,
${MetaType}_asPredicate, ${Class}_asPredicate
"""
script = self._getTypeBasedMethod('asPredicate', script_id=script_id)
if script_id is not None:
script = getattr(self, script_id, None)
else:
script = self._getTypeBasedMethod('asPredicate')
if script is not None:
return script()
return self
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment