• Resolved secc

    (@secc)


    Hi Tobias. I have a table with 2 different headers (german / french). Is it possible, to sort this tables? Currently it mixes the header lines and all the others. It must be somethink like blocking the first to lines.

    Thank you for your help.
    Manuel

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Are you showing both header rows at the same time? Then, no, I’m not aware of keeping those fixed, sorry ??

    But I thought that you would be hiding one of them, depending on the language? Or are you talking about the “Edit” screen here?

    Regards,
    Tobias

    Thread Starter secc

    (@secc)

    Hi Tobias
    Thank you for your feedback. Yes, im hidding one row depending on the language.
    It would be nice, if i can sort the tables by name and dont have to move them manually into the right position on the backend.

    Regards,
    Manuel

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the clarification. Unfortunately, I don’t really see a way to change the sorting on the “Edit” screen.
    The best solution here would probably be to simply use drag and drop (via the row number on the left) to again move the second header row up to the correct position.

    Regards,
    Tobias

    Thread Starter secc

    (@secc)

    Hi Tobias. Is there a way, to display it only sorted on the frontsceen? It doesnt have to sorted on the backend. Otherwise i will do it manually as you told before. Best regards. Manuel

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Manuel,

    yes, that’s possible. You could initiate a JavaScript sort here, once the page loads.
    For that, please try adding this to the “Custom Commands” text field on the table’s “Edit” screen:

    "order": [ [ 0, "asc" ] ]
    

    That number indicates which column to sort on, in this case the first one, as counting the columns starts with 0. Besides using "asc" for ascending order, you can also use "desc" for descending order.

    Regards,
    Tobias

    Thread Starter secc

    (@secc)

    Hi Tobias

    This works perfekt, also with the hidden row. Perfect. Thank you for your help. Best regards and a nice afternoon.
    Manuel

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sort Table with to Headers’ is closed to new replies.