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.

eZ debug

Timing: Jan 18 2025 11:28:47
Script start
Timing: Jan 18 2025 11:28:47
Module start 'layout'
Timing: Jan 18 2025 11:28:47
Module start 'content'
Timing: Jan 18 2025 11:28:48
Module end 'content'
Timing: Jan 18 2025 11:28:48
Script end

Main resources:

Total runtime0.8521 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.8125152.6094
Module start 'layout' 0.00620.0034 740.421939.4141
Module start 'content' 0.00960.8412 779.8359501.3906
Module end 'content' 0.85080.0013 1,281.22668.1875
Script end 0.8521  1,289.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4006160.0002
Check MTime0.00140.1623160.0001
Mysql Total
Database connection0.00080.088410.0008
Mysqli_queries0.804194.3627570.0141
Looping result0.00060.0676550.0000
Template Total0.819796.220.4098
Template load0.00200.229520.0010
Template processing0.817795.965720.4089
Template load and register function0.00010.014710.0001
states
state_id_array0.00100.115110.0010
state_identifier_array0.00110.126620.0005
Override
Cache load0.00160.1875160.0001
Sytem overhead
Fetch class attribute can translate value0.00120.137720.0006
Fetch class attribute name0.00100.121240.0003
XML
Image XML parsing0.00220.262520.0011
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00250.2926160.0002
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs