Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    That’s not really possible, as the sorting script obviously can not know which image should come first, i.e. what order the images should have.
    The best way for that is therefore to add a new column on the right of the column with the images, and to put a number into each cell there which then will be used for the sorting of the image column. We will then also hide that column, so that the user doesn’t see it. For that, you’ll have to add this to the “Custom Commands” textfield on the “Edit” screen of the table then:

    "aoColumnDefs": [ { "iDataSort": 1, "aTargets": [ 0 ] }, { "bVisible": false, "aTargets": [ 1 ] } ]

    If the images are in the first column (indicated by the 0 in the code), this would tell the script to use the numbers in the second column (indicated by the 1 (twice) in the code) for sorting. (Counting columns starts with 0 here in the code.)

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘sort by image’ is closed to new replies.