Forums / Developer / problem with object relation datatype

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

problem with object relation datatype

Author Message

justin kazadi

Thursday 25 September 2008 7:43:35 am

hello all,
i had created two custom content classes. the first is " post" and the second is "postcontainer".
the post content class have three attributes named : name, introduction,body as attribute.
the postcontainer content class have two attributes named : name (textline), listpost(object relations)(class allow is post).
the listpost have the multiple selection method.
i have ten instance of the post content class and i have one instance of the postcontainer.
i want to display only the five objects of the post content class from the postcontainer instance. but when i specified the value of the limit parameter in the fetch function , it didn't work.but the same fetch (code) run correctly on others datatype . i have put this code in my override/full/postcontainer.tpl. the code is :

        {def $pageLimit=5}
		                 	             	      	     
       {def  $childrenroot = fetch( 'content' , 'list' , hash( 'parent_node_id' , 2,
                                                                              'depth', 3, 
                                                                              'offset',  $view_parameters.offset,
                                                                              'limit', $pageLimit
                                                                             )
                                             )
       }
                 {foreach $node.data_map.name.content.relation_list as $nom}

                             {foreach $childrenroot as $child}
                    
                                     {if $child.node_id|eq($nom.node_id)}
                                                                    
		                 	  <a href={$child.url_alias|ezurl()}>

                                               {attribute_view_gui attribute=$child.data_map.name}

                                         </a>              
                                    {/if}
                             {/foreach}


                 {/foreach}
                                               

thanks in advance

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

justin kazadi

Friday 26 September 2008 1:08:39 am

i have find the solution

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein