Commit bbb6e1a9 authored by Jérome Perrin's avatar Jérome Perrin

core: minimal disabled_node support on Base_getMultiListFieldPropertyDictList.

It does not seem easily feasible to implement support at this level. If support
is needed, I guess the best would be to make a custom hash script that generate
the full category item list again, then it would know in which subfield list to
"dispatch" the None items.
parent 1119baea
...@@ -10,7 +10,15 @@ maximum_list_size = 5 ...@@ -10,7 +10,15 @@ maximum_list_size = 5
for item in item_list: for item in item_list:
# Get value of the item # Get value of the item
item_value = item[int(not is_right_display)] item_value = item[int(not is_right_display)]
# Hash key from item_value
# Hash key from item_value (the relative_url), so that different base categories
# appear as multiple multi list fields.
# The item_list can contain entries with None as relative_url, like when using
# disable_node option of CMFCategory. This case is not supported by this script,
# because heuristics to put the None entry in one or another subfield group
# are not implemented here.
if item_value is None:
continue
item_split = item_value.split('/') item_split = item_value.split('/')
item_key = '/'.join(item_split[:split_depth]) item_key = '/'.join(item_split[:split_depth])
base_category = item_split[0] base_category = item_split[0]
......
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