TablePress within a tab
-
Hello,
Great plugin! But is it compatible with TablePress? I would like to include a table within one of the tabs, but when I try, the tabby shortcodes seem to be ignored — all my content appears as one long page.
-Ken
-
I’m not aware of any incompatibility. I have just successfully set up a tablepress table within a tab on one of my test sites with no problems.
Please link to a page showing the issue on your site.
Hi,
Here’s a proof of concept. It’s not ready for production, so the password is “tabby”.
Here’s what the content looks like in the WordPress post editor:
[singlepic id=246 w=318 h=412 float=center] [tabby title="Issue Links"] various content goes here [tabby title="Index"] [table id=2 datatables_tabletools=true filter="V19I2" hide_columns="1-3" column_widths="7%|15%|15%|15%|48%" /] [tabbyending]I’ve tried making the table the first tab, but the results are the same. I also tried replacing the table with more typical HTML content, just to make sure the tab plugin was working, and it worked fine.
-Ken
Hi Ken,
from what I can see, the reason for this is that something on this page (maybe the theme or another plugin) is evaluating the [table] Shortcode twice.
That leads to a JS error.
Could you therefore please try again after turning off the usage of the DataTables JS library on the “Edit” screen of the table?Regards,
TobiasO hai, Tobias!
Disabling the DataTables option on the table itself did work! The downside is that the untabbed master index on a different page has lost its sorting functions:
As an alternative solution to the original problem, I tried turning the DataTables option back on and removed the “datatables_tabletools=true” parameter in the shortcode, thinking that might’ve been what was causing the tools to be loaded twice — but that didn’t fix the tabbing issue.
You suggested it might be a theme or plugin conflict. So I re-enabled DataTables on the table page and deactivated all plugins (except TablePress and Tabby) and switched to to the Twenty Fourteen theme. The problem persisted, unfortunately.
-Ken
Hi Ken,
ok, it might then be possible that Tabby is also evaluating the Shortcodes. Maybe cubecolour can shed some light on this?
Deactivating the DataTables JS library via the “Edit” screen won’t work if you need it on another page.
Therefore, please try deactivating via the Shortcode, i.e. change[table id=2 datatables_tabletools=true filter="V19I2" hide_columns="1-3" column_widths="7%|15%|15%|15%|48%" /]to
[table id=2 use_datatables=false filter="V19I2" hide_columns="1-3" column_widths="7%|15%|15%|15%|48%" /]Regards,
TobiasTobias,
I’ve re-enabled DataTables on the table itself and have disabled it on the tabbed page using
use_datatables=false, per your suggestion. This now seems to be working: the table shows up tabbed (but unsortable), and I have a sortable main table on a separate page.Works for me! Thanks!
-Ken
Apart from its own [tabby] & [tabbyending] shortcodes Tabby Responsive Tabs shouldn’t touch any others on the page.
Hi,
thanks for checking, cubecolour!
Not sure what’s happening here then… Good to see that you are happy though, Ken 🙂Best wishes,
TobiasThanks, both, for your swift help!
Its a bit of a strange one. As you seem to have a workaround I’ll set this as resolved.
Tobias, thanks for helping Ken with this.
Hi,
yes, unless we can come up with a possible reason, this can be marked as resolved.
Best wishes,
TobiasHi, I experience the same problem with Tabby in combination with Tablepress.
Without TablePress Extension: DataTables ColumnFilterWidgets and/or Row Filtering Tabby works fine. But when one of these extensions is activated. Tabby (most of the tiimes) does not work anymore.
You can view an example here http://www.leidenamateurvoetbal.nl/statistieken-lugdunum/
The strange thing is that in some cases it does work: http://www.leidenamateurvoetbal.nl/statistieken-sjz/
Any ideas?
Hi,
thanks for your question, and sorry for the trouble.
From what I can see, the reason for this is that table 65 has only one row. That will not work, because it doesn’t have a header row then. You can only do all of this with tables that have a header row and at least one content row.
Regards,
TobiasHi Tobias,
checked it out and added a few rows. This indeed solved the issue.
When the filter is activated it must find a row for the search string otherwise it produces an error.
Got it!
Thanks again.
Bart
Hi Bart,
correct. If the filter does not return a result, the table would not have a body row, and then the JS library fails.
Good to hear that you were able to solve this!Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
The topic ‘TablePress within a tab’ is closed to new replies.