Forums / Setup & design / Attribute Filter

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