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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:29:19
Script start
Timing: Jan 18 2025 18:29:19
Module start 'layout'
Timing: Jan 18 2025 18:29:19
Module start 'content'
Timing: Jan 18 2025 18:29:20
Module end 'content'
Timing: Jan 18 2025 18:29:20
Script end

Main resources:

Total runtime1.2589 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 588.0156152.6250
Module start 'layout' 0.00930.0067 740.640639.4453
Module start 'content' 0.01601.2417 780.0859490.4688
Module end 'content' 1.25770.0012 1,270.554712.1563
Script end 1.2589  1,282.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.3585160.0003
Check MTime0.00160.1304160.0001
Mysql Total
Database connection0.00140.108910.0014
Mysqli_queries1.208996.0302520.0232
Looping result0.00050.0363500.0000
Template Total1.216896.720.6084
Template load0.00190.147520.0009
Template processing1.214996.506620.6075
Template load and register function0.00010.008210.0001
states
state_id_array0.00100.080110.0010
state_identifier_array0.00150.122220.0008
Override
Cache load0.00150.1216160.0001
Sytem overhead
Fetch class attribute can translate value0.00090.072810.0009
Fetch class attribute name0.00150.116930.0005
XML
Image XML parsing0.00070.056210.0007
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00090.0733160.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs