Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is any option to sort for global view field.
There is any option to sort for global view field.
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedDo you mean a sort handler, or the option to make it sortable in tables etc..? Because if so, that is disabled by design.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedya i want table sorting.
Comment #3
Exploratus CreditAttribution: Exploratus commentedI second table sorting - really need it! :) A sort handler would be fantastic as well. But table sorting is so critical!
Comment #4
jemisond CreditAttribution: jemisond commentedAnother call for table sorting!
Comment #5
Marco van Bemmel CreditAttribution: Marco van Bemmel commentedCan't this be done with Views PHP?
I've installed the Views PHP module and added global PHP field to 'Sort criteria' and added
...but no results yet...
Comment #6
damiankloip CreditAttribution: damiankloip commentedYou are generally dealing with a rendered view at that point? So sorting by an html string seems like it might get a bit on the tricky side... ?
Comment #7
andrewigman CreditAttribution: andrewigman commentedYep, i have the same need!
What do you (damiankloip) mean by "it might get a bit on the tricky side..."?
It is impossible or could i acomplish trough a patch? or maybe creating a custom module?
thanks!
Comment #8
damiankloip CreditAttribution: damiankloip commentedReally #5, I'm pretty sure that will not work...
This module renders views at render time. After query, sorting etc... people need to understand that almost all table sorting works at the sql level. You can't add an order by to your query for another view that hasn't been rendered yet.
Even if you could. You would sort by rendered view html? Or which results. It's unfeasible to try and support in the module.