This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Multiple sort_by not working
expandshrink

Multiple sort_by not working

Multiple sort_by not working

Friday 25 August 2006 12:12:27 am - 2 replies

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

Friday 25 August 2006 12:28:57 am

Hi
U have 10 "blunk.gif Emoticon" and only 8 "("
should be:

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

Friday 25 August 2006 1:05:21 am

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from