Forums / Developer / attribute filter question

attribute filter question

Author Message

Paul d

Monday 12 December 2005 6:05:14 am

Hi,

I want to filter items of a folder using the attribute filter, but I have no items in the result.

The class id is 48, and items are under the folder id 194.

I try with the attribute_id instead of notice/title but I have the same result.

If I remove the line attribute_filter I have the two items in the list.

{let class_filter = array( '48' )
			id = 194	
	}

	{def $list_items = fetch('content',
			         'list',
				  hash(	'parent_node_id', $id,
				        'sort_by', array( 'published', false() ),
					'class_filter_type',  'include',
					'class_filter_array', $class_filter,					
					'attribute_filter', array('and', 
									array( 'notice/title',
									'=',
									'titulo2 - tipo 2' ) 
								)
					)
				)
	}
	{/let}

	{foreach $list_items as $item}
		{$item.name|wash()}<br />
		<b>{$item.object.data_map.tipo}&nbsp;&nbsp;{$item.object.modified|l10n( 'datetime' )}</b><br/><br/>
	{/foreach}

Any ideas?

Thank for advanced!
Pd

Ɓukasz Serwatka

Tuesday 13 December 2005 2:23:08 am

Hi Paul,

Tr y without 'and' in attribute_filter array:

'attribute_filter', array( array( 'notice/title', '=', 'titulo2 - tipo 2' ) )

 

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