Sort Files by filename
-
Hi David, this for you is quick question but how do I sort a group of files by their filename?
On the page in question have a look at the table “General Reports & Briefings” which has about seven PDFs in it.
What I want to do is to sort them by their filename and for the life of me I can’t work it out!
They all have a filename that begins with YYYY_MM_DD_and then a descriptive title so they should sort ok but they don’t! The last two are out of sequence.
The short-code for that table currently has:
[mla_gallery mla_markup=basic-2-column mla_style=basic-2-column category_name=pub-doc tag=”bridgewg-briefings” orderby=”file ASC”]. The markup for basic-2-column contains this:
post_parent=all, post_mime_type=application/pdf, size=icon_only, columns=1, mla_image_attributes=’width=”16″ height=”16″ ‘, link=none, orderby=”name?DESC”. I think the shortcode overrides the basic-2-column setting?In the orderby have tried using base_file (I just have one uploads folder!), file_name etc but nothing changes!
If this isn’ directly possible do I then have to copy over the filename into a another field eg Name and then sort by that – eg set the Name/Slug field to template:[+file_name+]
Cheers
Paul
The page I need help with: [log in to see the link]
- The topic ‘Sort Files by filename’ is closed to new replies.