Details
-
Improvement
-
Resolution: Obsolete
-
Medium
-
4.0.6, 4.0.7, 4.1.3, 4.1.4, 4.2.0, 4.3.0beta2, 4.3.0rc1
-
None
Description
There is currently no way to filter resulting objects when fetching related_objects.
The attached patch adds support for this feature, using the following syntax:
{def $res1=fetch( content, related_objects, hash( 'object_id', 2413, 'all_relations', 'common', 'related_class_identifiers', array( 'image' ), ))}
For consistency sake, it could make sense to change the patch a bit to support the same syntax as fetch/content/list: class_filter_type:(include|exclude), class_filter_array:(class1,class2,classN). The underlying SQL perfectly fits this evolution.