How to filter on a specific enum value

Author Message

Anja Lundin

Tuesday 08 February 2005 12:51:01 am

Hi,
I'm trying to filter a list and I would like it to contain only ads (a class) with a specific enum value. My class is called advertisement and the attribute with the enum values is called category.
I've tried this, but it doesn't work:

{section loop=fetch(content, list, hash(parent_node_id, $node.node_id,class_filter_type, include, class_filter_array, array
('advertisement'),attribute_filter, array('advertisement/category','=','Säljes')))}

I have no clue what is wrong. Can some one help me with this, please?

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

Eivind Marienborg

Tuesday 08 February 2005 1:34:37 am

You have to use the attribute_id, that is found when editing the class in admin-view.

Łukasz Serwatka

Tuesday 08 February 2005 1:38:12 am

{section loop=fetch(content, list, hash(parent_node_id, $node.node_id,class_filter_type, include, class_filter_array, array
('advertisement'),attribute_filter, array('advertisement/category','=','2')))}

If Säljes is second then put 2

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 20 2025 01:05:34
Script start
Timing: Jan 20 2025 01:05:34
Module start 'layout'
Timing: Jan 20 2025 01:05:34
Module start 'content'
Timing: Jan 20 2025 01:05:35
Module end 'content'
Timing: Jan 20 2025 01:05:35
Script end

Main resources:

Total runtime0.8849 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.2734152.6406
Module start 'layout' 0.00670.0035 741.914139.4609
Module start 'content' 0.01020.8731 781.3750583.1875
Module end 'content' 0.88330.0015 1,364.562512.1563
Script end 0.8848  1,376.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3927160.0002
Check MTime0.00150.1694160.0001
Mysql Total
Database connection0.00090.099010.0009
Mysqli_queries0.835594.4148590.0142
Looping result0.00100.1117570.0000
Template Total0.847595.820.4238
Template load0.00160.183920.0008
Template processing0.845995.592620.4229
Template load and register function0.00010.010710.0001
states
state_id_array0.00180.202410.0018
state_identifier_array0.00100.118620.0005
Override
Cache load0.00130.1485160.0001
Sytem overhead
Fetch class attribute can translate value0.00190.219430.0006
Fetch class attribute name0.00090.106660.0002
XML
Image XML parsing0.00150.174030.0005
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00110.1227300.0000
String conversion0.00000.001240.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
3content/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
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs