Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

Enhanced filters for content/list*, content/tree

The fetch functions content/list, content/list_count, content/tree and content/tree_count have been given extra filter functionality.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/features/3.6/content_tree_enhanced_filters.txt

*Title: Enhanced filters for content/list*, content/tree*

*Documentation:
The fetch functions content/list, content/list_count, content/tree
and content/tree_count have been given extra filter functionality.

Filter attribute:
The filter attribute 'owner' has been added, this refers to the owner_id
of the content object. This can for instance be used to find all objects
of a given user.

Filter operations:
The following operations have been added.
- in, not_in: This matches the field against an array of values.
- between, not_between: This matches the field against a start and end value
  passed as an array with two elements. The field must either be part of that
  range (for between) or outside of it (for not_between).
- like, not_like: This matches the field against a wildcard string. The wildcard
  character is a *.

Example of 'owner' usage:
Fetches all objects for the current user.
{fetch( content, tree,
        hash( parent_node_id, 2,
              attribute_filter,
              array( array( 'owner', '=', $current_user.contentobject_id ) ) ) )}


Example of 'in' usage:
Fetches bugs with priority 1 and 4.
{fetch( content, tree,
        hash( parent_node_id, 2,
              attribute_filter,
              array( array( 'bug/priority', 'in', array( 1, 4 ) ) ) ) )}

Example of 'between' usage:
Fetches bugs with priority 2, 3 and 4.
{fetch( content, tree,
        hash( parent_node_id, 2,
              attribute_filter,
              array( array( 'bug/priority', 'between', array( 2, 4 ) ) ) ) )}

Example of 'like' usage:
Fetches all bugs with the text 'class' in it.
{fetch( content, tree,
        hash( parent_node_id, 2,
              attribute_filter,
              array( array( 'bug/title', 'like', '*class*' ) ) ) )}

Something wrong on this page? Report an error

Documentation license

This page was inherited from the documentation of the original software. It is not covered by the GNU Free Documentation License; it is distributed under the GNU General Public License, version 2.

Copyright (C) 1999 - 2014 eZ Systems AS and contributors