I have a view with grouping (by one field) and sorting by nodequeue weight. I want to sort the groups as well so I've used hook_views_pre_render and sorted the results array programmatically, but as far as I can see the results aren't rendered as the results array on $view->result order.

What am I missing? Workaround will also be great! Thanks!

  • The link isn't really helpful in my case. The problem was with hook_view_pre_render. When I migrated my custom code to hook_views_post_execute it began to work!
    – rreiss
    Jul 6, 2014 at 13:14

1 Answer 1


The problem was hook_views_pre_render, for some reason the markup is already render at this stage (weird..), when I used the same code in hook_views_post_execute it worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.