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

2006-01-18 JPS - support of group_by

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12143 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b7f4801
...@@ -100,11 +100,11 @@ language = portal.Localizer.get_selected_language()\n ...@@ -100,11 +100,11 @@ language = portal.Localizer.get_selected_language()\n
\n \n
# Search the catalog for all documents matching the reference\n # Search the catalog for all documents matching the reference\n
# this will only return documents which are accessible by the user\n # this will only return documents which are accessible by the user\n
web_page_list = portal_catalog(reference=name, portal_type=valid_portal_type_list, \n web_page_list = portal_catalog(reference=name, portal_type=valid_portal_type_list,\n
order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')],\n language=language,\n
language=language)\n order_by=[(\'version\', \'descending\')],\n
# XXX - group_by is missing here\n group_by=(\'reference\',))\n
# portal_catalog extension required\n \n
try:\n try:\n
# Try to get the first page on the list\n # Try to get the first page on the list\n
web_page = web_page_list[0]\n web_page = web_page_list[0]\n
...@@ -112,9 +112,8 @@ try:\n ...@@ -112,9 +112,8 @@ try:\n
except IndexError:\n except IndexError:\n
# Search again without the language\n # Search again without the language\n
web_page_list = portal_catalog(reference=name, portal_type=\'Web Page\', \n web_page_list = portal_catalog(reference=name, portal_type=\'Web Page\', \n
order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')])\n order_by=[(\'version\', \'descending\')],\n
# XXX - group_by is missing here\n group_by=(\'reference\',))\n
# portal_catalog extension required\n
try:\n try:\n
# Try to get the first page on the list\n # Try to get the first page on the list\n
web_page = web_page_list[0]\n web_page = web_page_list[0]\n
...@@ -205,6 +204,10 @@ return web_page\n ...@@ -205,6 +204,10 @@ return web_page\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSection_getDocumentValue</string> </value> <value> <string>WebSection_getDocumentValue</string> </value>
</item> </item>
<item>
<key> <string>isIndexable</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
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