Attribute Filter

Author Message

Mahesh Arvind

Thursday 08 April 2004 9:10:12 pm

Hi,

I am using attribute filter to filter out articles which are of language "English" and based on the type of article, which is an Enum - option. The code I am using is

{let cont=fetch('content','list',
hash( parent_node_id,"133"),
class_filter_type, "include",
class_filter_array, array(17),
attribute_filter,array( and,array(196, '=', $node.data_map.language.content),(161,'=','Prayer Request Submission')))}

However, I do not get anything published. $node.data_map.language.content is the language of the article and Prayer Request Submission is the type. So can anybody help me out how to filter the articles based on these two ?

Thanks & Regards
Mahesh

Thanks & Regards
Mahesh

Mark Irvine

Tuesday 13 April 2004 7:23:42 am

Hi Mahesh,

One thing I have found is that when I try to do an attribute_filter on items in a select list you can't search on the text. If you look into the node using attribute(show) you'll find that 161 will be equal to a number (0,1, 2 and so on for each option).

so

(161,'=','Prayer Request Submission')

should probably read something like

(161,'=','0')

You can dig down to find which is which, or try trial and error until you find what number correcponds to each option in your select list.

Hope that helps,
Mark

Mahesh Arvind

Thursday 15 April 2004 4:28:43 am

Hi Mark,

Thank you for the reply.

Thanks & Regards
Mahesh

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 19 2025 01:18:23
Script start
Timing: Jan 19 2025 01:18:23
Module start 'layout'
Timing: Jan 19 2025 01:18:23
Module start 'content'
Timing: Jan 19 2025 01:18:24
Module end 'content'
Timing: Jan 19 2025 01:18:24
Script end

Main resources:

Total runtime1.1520 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.0084 590.1875152.6094
Module start 'layout' 0.00840.0032 742.796939.4141
Module start 'content' 0.01151.1389 782.2109535.5234
Module end 'content' 1.15050.0015 1,317.734412.1875
Script end 1.1519  1,329.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3335160.0002
Check MTime0.00160.1365160.0001
Mysql Total
Database connection0.00170.150410.0017
Mysqli_queries1.096395.1667570.0192
Looping result0.00050.0474550.0000
Template Total1.111596.520.5558
Template load0.00280.242620.0014
Template processing1.108796.244420.5544
Template load and register function0.00010.009510.0001
states
state_id_array0.00100.086310.0010
state_identifier_array0.00170.143520.0008
Override
Cache load0.00230.2023280.0001
Sytem overhead
Fetch class attribute can translate value0.00080.071420.0004
Fetch class attribute name0.00100.083740.0002
XML
Image XML parsing0.00060.049720.0003
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00080.0671160.0000
String conversion0.00000.000840.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
2content/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
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs