WP-Filebase Download Manager
[resolved] Any possibility to sort files in DataTable views ? (6 posts)

  1. Wazomba
    Posted 3 years ago #

    Hello, I've read this before but it's too hard to me. Can someone help for simply display files in DataTable views with a sort order (shortcodes do not work at all for the DataTable views)

    thx alot


  2. Fabian
    Plugin Author

    Posted 3 years ago #

    Since Version, DataTables should be sorted acording to the shortcode paramenter "sort", for example: [wpfilebase tag=list tpl=data-table sort='>file_size' /]

    If its not working, whats the URL of your page?

  3. Wazomba
    Posted 3 years ago #

    The site is still under developpement, so I protected with plugin "Site Pin". But I'll disable it for you right now, your plugin is SO MUCH important for me.
    I've tested sorting with different parameters but...:-(
    Actually, the page uses the following short code :
    [wpfilebase tag=list id=5 tpl=data-table sort='>file_name' num=100 /]

    Site url : http://www.fnisci.net/?page_id=248
    - WordPress 3.5.0 (waiting to update...)
    - WP-Filebase (waiting to update...)
    - Many other plugins using JQuery (no conflict, all updated)

    Note: In a unique page, I use plugin GT Tabs to display each file category in a different tab. For example : 2013, 2012, 2011...

  4. Wazomba
    Posted 3 years ago #

    BTW, I've forgotten to thank you very much for your reply... :-)

  5. Fabian
    Plugin Author

    Posted 3 years ago #

    You can only sort by properties that are actually listed.
    Since your list template uses %file_display_name% (and not %file_name%), the shortcode should be:

    [wpfilebase tag=list id=5 tpl=data-table sort='>file_display_name' num=100 /]

    If you want to sort by %file_name%, you have to add the column for it to the file template:

  6. Wazomba
    Posted 3 years ago #

    Yesssssssssss!! It works !! It was so simple in fact.
    Thank you very very very much my friend !
    I'm marking this topic as Resolved

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic