Attribute Filtering

Author Message

Masamune

Thursday 18 August 2005 3:36:07 am

Hi everyone

I'm trying to fetch all sub items in a folder of which names start with a specific letter, say 'A', is it possible with the attribute filtering on the name? if yes how should I write the syntax? thanks.

cheers..

Konrad Mazurkiewicz

Thursday 18 August 2005 12:46:39 pm

Hi,

yes, this is possible.
Look at this code:

$list_items=fetch('content',
                  'list',
                  hash('parent_node_id', $node.node_id,
                       'offset', $view_parameters.offset,
                       'sort_by', $node.sort_array,
                       'attribute_filter', array( array( 'name', 'like', 'A' ) ),
                       'class_filter_type', 'include',
                       'class_filter_array', array(32),
                       'limit', $page_limit ) )

Konrad

Konrad Mazurkiewicz

Thursday 18 August 2005 12:51:14 pm

Ops, attribute filter should looks like

'attribute_filter', array( array( 'name', 'like', 'A*' ) )

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.