Posted by rogernyc on August 12, 2013 at 1:48pm
In DS 'displays >> search' in the 'group by type settings' area, setting the weight of the node-type groups is having no effect on the order of the groups in the search result display. They order by 'group label'. I've experimented with the weights, cleared the cache etc with no luck. Am I missing something?
Using DS 7.24, Weight 7.23, Drupal 7.22, Custom search 7.1.1
thanks!
Comments
Same issue here
Display suite: 7.x-2.6
Drupal: 7.26
No custom search installed, the weight is just not doing anything.
I'm seeing it too
And after looking at the module code, I know it's not sorting this stuff by weight at all but just inserting result groups in order of the results. I made a patch for this. I'll be opening a bug and submitting it there.
I can't attach the patch file here, but here is the text of it in case you have a hard time finding the bug report I post it to; this is based on v7.x-2.7:
*** sites/all/modules/ds/modules/ds_search/ds_search.module 2014-10-28 03:47:46.000000000 -0400
--- ../ds_search.module 2014-11-22 21:54:58.232102702 -0500
*** 311,316 ****
--- 311,323 ----
return theme('ds_search_page', $build);
}
*/
*** 380,385 ****
--- 387,393 ----
$parity['ds-other'] = $parity['ds-other'] == 'odd' ? 'even' : 'odd';
}
}
+ uasort($build['search_results'], '_ds_search_cmp_group_by_weights');
}
/**
-Mike
Merci, Mike :-) Your code is
Merci, Mike :-)
Your code is working for me as well, on Display Suite Search (ds_search) Version : 7.x-2.11
Cool !