I've got Node Gallery (latest Dev) installed and I've experienced some issues regarding default sort order.
After uploading images the sort order of the images displays at random.
I would prefer a sort order like 'filename, ascending', but I cannot seem to get this working.
Any idea?
It crossed my mind that the problem could even be at the uploading process with plupload???

Some help would be great!

Comments

Vincent Rommelaars’s picture

Component: Code » Howto/FAQ/Example
Priority: Major » Normal
Status: Needs work » Closed (works as designed)

I found the solution to the problem.
You just have to adjust de view sorting.
Add another sort item to the default 'Node Gallery: Gallery Item Views'.
This should be Content:Title ascending if you want a default sort order by title and select as relation 'Gallery item' which should already be present..
Make shure it's the second option in sort order, so a custom sort order would override it.
That's it!

jchin1968’s picture

Issue summary: View changes

Thanks for posting the solution, Vincent. The default sorting was driving me crazy, especially for large galleries with over 100 images.

Frontmobe’s picture

Sorting by title for large sets of images often introduces the problem of natural sorting when the image-titles contain some form of sequencing. To illustrate, views would sort your image titles this way by default (as suggested above):

img_1
img_11
img_2
img_3

While you would expect to see a more natural sort like:

img_1
img_2
img_3
img_11

This is exactly what the Views Natural Sort module solves, check it out at https://www.drupal.org/project/views_natural_sort.

It saved me from having to write my own solution for this, many thanks to the maintainers of Views Natural Sort!!

bredy73’s picture

I try the solution at point #1 but doesn't work. After uploading images the sort order of the images displays at random. The first time I see the manage item the orther is ok, but if I go to sort items the orther is random.
On the view I have the (Node Gallery Relationship) Node Gallery Relationship: Item Weight (Sort Order) (asc) and Contenuto: Titolo (asc) before I have Content:Nid (asc)

bredy73’s picture

Status: Closed (works as designed) » Active