Forums / Developer / (reverse_)related_objects VS Object relation browse

(reverse_)related_objects VS Object relation browse

Author Message

Pierre Tissot

Thursday 04 May 2006 6:14:48 am

Hi eZ planet,

I have the follwing problem, I started to use the "Object Relations" to make my project, every thing was worlking fine, meanwhile I found the "Object relation browse" extention and I started toi use it. Well the problem is that it seems that the "attribute_identifier" does't work well with this extention beacause I'm having a completly diferent display of the information. (it was supose to stay exactly the same, no???)

I maximum that i was abble to do is to list all the relations with all_relations set to true.

what is the diference between this two codes:

Code 1:

 	{def $objects=fetch( 'content', 'reverse_related_objects',
                     hash( 'object_id',  $node.object.id,'all_relations', true()) )}
 
        {foreach $objects as $object}
            <a href={$object.main_node.url_alias|ezurl}>{$object.name|wash()}</a><br/>
        {/foreach}
 

Code 2:

	{def $objects=fetch( 'content', 'reverse_related_objects',
                     hash( 'object_id', $node.object.id) )}
        
	{foreach $objects as $object}
	      <a href={$object.main_node.url_alias|ezurl}>{$object.name|wash()}</a><br/>
	{/foreach}
 

Well my problem is that I need to see what are the relations between A-B and A-C and i want to have all the object that are under B related to A and separatly all C under A. With only "all relations" working and not the "attribute_identifier" i dont now how to do this.....any help?

Thanks in advance
PiR