Commit f3c4b720 authored by Łukasz Nowak's avatar Łukasz Nowak

- implement totally basic filtering


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27629 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc209ecf
......@@ -144,7 +144,18 @@ class BusinessPath(Path):
XXX - implementation missing
TBD - look at CategoryTool._buildFilter for inspiration
"""
return category_list
filtered_category_list = []
for cat in category_list:
# basic filtering, dirty way:
# - remove categories, which are not defined in category parameter
# - support base parameter
base_cat, base_value = cat.split('/')[0] , '/'.join(cat.split('/')[1:])
if base_cat == category:
value = base_value
if base == 1:
value = '/'.join([base_cat, value])
filtered_category_list.append(value)
return filtered_category_list
# Dynamic context based categories
def _getDynamicCategoryList(self, context):
......
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