• Data,  Helpful hints

    Shift numbered items in a gallery by more than one row

    There are many posts on reordering a gallery with up/down buttons, but what if you want to shift an item a large number of places and re-order everything in between in one action ? The assumption here is that the gallery contains a sequential numeric field, is sorted by this field and the user wants to change a row item to another position with the result that the gallery will then be sorted in the new order.Firstly, there are two possibilities on the number shift – it could be larger or smaller than its original position, so that needs to be dealt with separately. I have also allowed for there…