So, I have a view (D7, Views 3) that provides a list of staff with a thumbnail image based on a location "contextual filter". Some staff members are set as "sticky" and need to appear above all the others. All staff members also need to be sorted by last name, which i'm doing with a custom php sort.

So, first, stickied staff members should be shown sorted by last name. Next, unstickied staff should be shown also sorted by last name.

Last name sort works great, but I can't get the view to group them by sticky.

Here's a screenshot of the view: http://grab.by/h2Gg Here's a screenshot of the first part of the output: http://grab.by/h2GA (Jeremy Irwin is stickied, so should display at the top)

Here's the php code i'm using for the last name sort:

list($fname1, $lname1) = explode(' ', $row1->title , 2);
list($fname2, $lname2) = explode(' ', $row2->title , 2);
return(strcasecmp($lname1,$lname2));

Any suggestions why this isn't playing nicely with sorting by sticky?

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Views PHP
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Sort Handler

Move to Views PHP module, it could be that it ignores the normal sort criteria?

skylord’s picture

Issue summary: View changes

Seems like duplicate of #1721578: Views PHP exposed sorting overrides other exposed sorting even if disabled - it already has patch - at least for exposed sort.