Tablepress, DataTables ColumnFilterWidget and HTML links give a sorting problem
-
Hello Tobias,
First of all i would like to thank you for making such a great plugin. Even for a WP rookie it’s simple to implement and to make changes.On a website (http://wijnvriend.dubbl.nl/wijnoverzicht) i made a table with various links. I added these links as a html link (eg. Beaujolais Blanc 2013).
Now i have the problem that, when i select an item in the first, fifth and sixth column (the columns with the links), the result is nothing. This is probably because of the links.
Is there a way to fix this?
Many thanks,
Marc
-
Hi Marc,
thanks for your post, and sorry for the trouble.
You are correct, this is indeed caused by the HTML code for the links. As that contains quotation marks, it trips up the ColumnFilterWidgets JS code.
A workaround for this would be to add extra columns (that will be hidden to the user) that contain the same words again, but without the links.
You can then hide the new/second column with some CSS and hide the (not working) first dropdown with the datatables_columnfilterwidgets_exclude_columns` parameter that is explained on the Extension’s web page.
Does this explanation make sense?Regards,
TobiasYes! Got it.
Going to try it this afternoon; keep you posted!
MarcHi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Hi Tobias,
Sorry, I just edited this post since I found the way to enter custom css commands (and the commands as well) on another one of your posts. Thank you so much!
Thank you so much for your absolutely amazing work! My group is working on a project using your code and we are going to send you a donation and get some premium features. At the moment we are getting the prototype ready to ‘sell’ before we roll out the full site.
Thanks a million!
Hey Honda,
i used this:.tablepress-id-4 .column-2, .column-7, .column-9 {
display: none;
}The tablepress id and columns are probably different in your case.
MarcHi Marc,
Thanks, that worked!
Brilliant!
Hi,
just for completeness, the CSS code should have the table ID selector in all three lines! Otherwise, columns 7 and 9 would be hidden in other tables as well:
.tablepress-id-4 .column-2, .tablepress-id-4 .column-7, .tablepress-id-4 .column-9 { display: none; }Regards,
TobiasHi Tobias,
Thanks, that saved me from potentially pulling my hair out!
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
The topic ‘Tablepress, DataTables ColumnFilterWidget and HTML links give a sorting problem’ is closed to new replies.