Multiple sort_by not working

Author Message

Asa Hardcastle

Thursday 24 August 2006 3:12:27 pm

Hi All, This fetch works and sorts by company but not by product_name. Both are Text Lines. Am I doing something wrong?

{def $nodes=fetch( content,list,hash( parent_node_id, $node.parent_node_id,
                        depth, 1,
                        'sort_by', array( 
                                                array( 'attribute', true(), 'product/company') ), 
                                                array( 'attribute', true(), 'product/product_name') ) 
                                                ),
                        class_filter_type,     include, class_filter_array,    array( 'product' )
                        ))}


<ul>
{foreach $nodes as $my_node}
<li>  {$my_node.object.data_map.company.content}     
  {$my_node.object.data_map.product_name.content} </li>
{/foreach}
</ul>
{undef}

thanks,
asa

Marcin Drozd

Thursday 24 August 2006 3:28:57 pm

Hi
U have 10 ")" and only 8 "("
should be:

'sort_by', array( 
              array( 'attribute', true(), 'product/company'),
              array( 'attribute', true(), 'product/product_name')
                      ),

http://ez-publish.pl

Asa Hardcastle

Thursday 24 August 2006 4:05:21 pm

omg. Thank you. Very embarrassing, I guess my eyes are too tired for parentheses & curly brackets. All fixed, of course.

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 31 2025 03:42:05
Script start
Timing: Jan 31 2025 03:42:05
Module start 'layout'
Timing: Jan 31 2025 03:42:05
Module start 'content'
Timing: Jan 31 2025 03:42:06
Module end 'content'
Timing: Jan 31 2025 03:42:06
Script end

Main resources:

Total runtime1.1241 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.1328151.2109
Module start 'layout' 0.00490.0038 739.3438220.6875
Module start 'content' 0.00871.1145 960.03134,300.2266
Module end 'content' 1.12320.0009 5,260.25787.8516
Script end 1.1241  5,268.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3057160.0002
Check MTime0.00120.1097160.0001
Mysql Total
Database connection0.00080.067110.0008
Mysqli_queries1.046493.0888570.0184
Looping result0.00050.0419550.0000
Template Total1.058594.220.5293
Template load0.00180.159720.0009
Template processing1.056794.004820.5284
Template load and register function0.00140.125810.0014
states
state_id_array0.00250.218310.0025
state_identifier_array0.00150.134720.0008
Override
Cache load0.00140.1282140.0001
Sytem overhead
Fetch class attribute can translate value0.00160.138220.0008
Fetch class attribute name0.00240.214930.0008
XML
Image XML parsing0.00020.019120.0001
class_abstraction
Instantiating content class attribute0.00000.001130.0000
General
dbfile0.00070.0630100.0001
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs