WordPress.org

Forums

TablePress
[resolved] Sorting Ascending: Links (4 posts)

  1. Maggew Dot Com
    Member
    Posted 2 years ago #

    When a visitor clicks the table header, tablepress correctly sorts ascending.

    WP Admin > Tablepress > Edit Table > Column A > Sort Ascending Image does not give the same results.

    *sometimes domain is different than name
    *sometimes link starts with http:// or www. or etc..

    How do I get the same results as the visitor using the Sort Ascending Image?

    Thanks for the quality work, love the community contribution!

    *import / export table

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, I have bad news: The sorting algorithms on the frontend (where the visitor sorts) and on the "Edit" screen (where the admin sorts) are fundamentally different at this time. Due to that, the sorting on the "Edit" screen is inferior to the sorting on the frontend. This is for example visible in your table: While the frontend sorting recognizes that the cell content is a link (i.e. it's HTML code), the "Edit" screen sorting will not recognize that and sort the entire string. I have plans to make these sortings equal, but unfortunately, this is not that easy. Sorry.

    Regards,
    Tobias

  3. Maggew Dot Com
    Member
    Posted 2 years ago #

    What may I do to help solve this problem?

    Thanks for the swift reply.

    ETA on integration?

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    hhm, that's hard to say... Basically, what's necessary is the integration of the DataTables JavaScript library on the "Edit" screen. However, due to the structure of the HTML code there (with many textareas and other stuff), this is not trivial. Also, the JS library's sorting code would have to be adjusted to use the content of the textareas for sorting, and it would have to take into account changed cells. This is not that easy unfortunately, and that's why I can't give an estimate on when this will be available :-(

    Now, to maybe at least find a workaround for you to bring the table into the desired order: How often would you be performing this sort on the "Edit" screen? Just once for one table for the initial order? Or more often/regularly on several tables?

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.