Commit f341750c authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Add support for Category portal type in search result.

parent 92d8556a
...@@ -97,6 +97,9 @@ url_template_dict = {\n ...@@ -97,6 +97,9 @@ url_template_dict = {\n
\n \n
default_document_uri_template = url_template_dict["jio_get_template"]\n default_document_uri_template = url_template_dict["jio_get_template"]\n
\n \n
def getRealRelativeUrl(document):\n
return \'/\'.join(portal.portal_url.getRelativeContentPath(document))\n
\n
def getFormRelativeUrl(form):\n def getFormRelativeUrl(form):\n
return portal.portal_catalog(\n return portal.portal_catalog(\n
portal_type="ERP5 Form",\n portal_type="ERP5 Form",\n
...@@ -909,7 +912,7 @@ elif mode == \'search\':\n ...@@ -909,7 +912,7 @@ elif mode == \'search\':\n
"href": default_document_uri_template % {\n "href": default_document_uri_template % {\n
"root_url": site_root.absolute_url(),\n "root_url": site_root.absolute_url(),\n
# XXX ERP5 Site is not an ERP5 document\n # XXX ERP5 Site is not an ERP5 document\n
"relative_url": document.getRelativeUrl() or document.getId(), \n "relative_url": getRealRelativeUrl(document) or document.getId(), \n
"script_id": script.id\n "script_id": script.id\n
},\n },\n
},\n },\n
......
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