Forums / Developer / attribute_filter problems with fetch : related_objects

attribute_filter problems with fetch : related_objects

Author Message

Gwenael Perier

Monday 18 December 2006 7:25:14 am

I would like to filter one attribute but i don't want to have the attribute id (because the data comes from importing )

$auteurs=fetch('content','related_objects',hash('object_id',$node.object.id,													 'attribute_filter','auteurs'	))

There is no problems when i put the id of the attribute.

Any idea ?

Thanks for reply

Nick Olaros

Monday 18 December 2006 8:30:16 am

Hi!

You need to give your class/your attribute as a parameter.

In your code it would look like that:

$auteurs=fetch('content','related_objects',hash('object_id',$node.object.id,                  
  'attribute_filter','maClasse/auteurs'   ))

That should work.

Gwenael Perier

Tuesday 19 December 2006 5:59:55 am

It works , thanks a lot