Allow Views sorting by filename

BWPanda - January 9, 2009 - 14:51
Project:ImageField
Version:5.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I'd be great if you could implement something that would allow sorting in Views by filename...

My situation is that I've attached multiple images to a node, and am using Views_Slideshow to create a slideshow of the images for each particular node. I'd like to be able to sort the images to come up in the order I named them, but couldn't find a way of doing this currently.

#1

quicksketch - March 11, 2009 - 00:27
Category:feature request» support request
Status:active» fixed

You can already do this. Add a relationship for the ImageField you want to sort by file name by clicking + (plus) in the relationships section, then add the relationship "Content: [Label of field] (field_[name_of_field])". Now under sorts, click + (plus) and then add a sort for File: Filename.

#2

BWPanda - March 11, 2009 - 22:46

Thanks for that! It took me a while to remember what site I was talking about back then ;)
I didn't think about using relationships for sorting... only ever used them for filters.
That works well!

#3

System Message - March 25, 2009 - 22:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#4

rhimes - November 1, 2009 - 16:15
Version:6.x-3.x-dev» 5.x-2.x-dev
Status:closed» active

how would you do this in 5.x-2.x versions, views 5.x-1.x?

#5

quicksketch - November 1, 2009 - 18:38

You cannot sort by filename in Views 5.x afaik. Views in Drupal 5 does not have relationships, so you're restricted to whatever sorts ImageField provided. New features will not be added to the 5.x version to add this functionality.

 
 

Drupal is a registered trademark of Dries Buytaert.