Forums / Developer / How to filter on a specific enum value

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