I want to make the default sorting on the page "Sort Items" to be by field "changed".
In file node_gallery_api.pages.inc on the line 60 I changed the line
"$original_sort[] = $image->nid;" on "$original_sort[] = $image->changed;"
How do I set sorting DESC?

Comments

Arturus created an issue.

Arturus’s picture

In Views "Node Gallery: Gallery Item Views", delete from Sort criteria field "Node Gallery Relationship: Item Weight" and to do the sorting field "Nid" order "desc".

If you need the same sort on the page "Sort Items" in file node_gallery_api.pages.inc after the line 56

//sort images on created
   $images_sort = array();
   for ($i = 0; $i < $image_count; ++$i) {

         $image = $images[$i];
         $images_sort[$i] = $image->created; 

        }
   arsort($images_sort);

and change the line "for ($i = 0; $i < $image_count; ++$i) { "
on "foreach($images_sort as $i => $value) { "