rlv-dan / Snap2HTML

Generates directory listings contained in a single, app-like HTML files
http://www.rlvision.com/snap2html
GNU General Public License v3.0
484 stars 95 forks source link

Default sorting high <> Low on opening #15

Closed Espada72 closed 4 years ago

Espada72 commented 4 years ago

Is there a way to open a generated html with the name column already sorted high to low. I've a directory containing about 1350 service information bulletins sorted on year-release#.

Currently files will show up like:

2004-001 machine model - subject 2004-002 machine model - subject <> 2020-074 machine model - subject 2020-075 machine model - subject

Would be great to always have the most recent release on top without needing to sort the name column by clicking the header first. I've adapted de template without issues to match my website and all works great, but I cannot find how to do this. Would this be possible at all?

rlv-dan commented 4 years ago

Open the template and find

sortInitialOrder: "desc",

After this line, add

sortList : [[0,1]],

(0 is first column, 1 is direction)