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.