Active
Project:
Facet API
Version:
7.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2013 at 13:45 UTC
Updated:
28 Oct 2013 at 08:39 UTC
Currently the only available sort methods are:
- facet active
- count
- display value
- display value (natural)
- indexed value
I'd like to order the list using any indexed entity field.
I've wrote a custom module which implements hook_facetapi_sort_info(), it lets me to sort a facet display block by an entity field but it should be better to have a configuration ui to select the fields.
What do you think about?
Comments
Comment #1
cpliakas commentedI'm not exactly sure what you mean, but I'd love to see a patch with your code (or even just your code) to get a better handle. Great job using the API to accomplish what you needed to do.
Thanks for the post,
Chris
Comment #2
finex commentedThe module is quite simple and it works only if with a field called "order" is present. Moreover the performance are not good because of two "node_load" calls, but the code can be improved in the future. I needed to implement the feature in less than 20 minute so the code is a bit dirty.
I've called the module "facetapi_field_sort" and this is the facetapi_field_sort.module code:
What do you think about? Would be interesting to extend facetapi module in order to allow to select any indexed field on the sort settings?
Comment #3
summit commentedHi,
What is the status of this module please?
Would love to be able to sort the results on price. With view from Commerce Kickstart I am not able to get that working...
greetings, Martijn