Hi,
thanks for your question, and sorry for the trouble.
Unfortunately, I can’t really think of a solution here 🙁 When the Shortcode is evaluated, the function that is executed does not know, which cell/row it currently “lives” in 🙁
And I simply can’t think of a way to pass dynamic data like this to it 🙁
Regards,
Tobias
You could edit your tables on a spreadsheet instead of within WordPress and then import it as a .csv every time you make changes. For example, in cell A1 you could use the formula:
="[table-cell id=123 cell="&A2&" /]"
…to include the contents of cell A2 within cell A1. It sounds like you’re wanting multiple cell contents in one cell so you would just add an & and then the formula for the next cell:
="[table-cell id=123 cell="&A2&" /]"&"[table-cell id=123 cell="&A3&" /]"&"[table-cell id=123 cell="&A4&" /]"
This makes cell A1 contain the contents of A2, A3, and A4. Then when you add/delete rows in the spreadsheet (unlike in TablePress via WordPress), your shortcodes are automatically updated. Don’t forget to save your spreadsheet with the formulas as .xls or .ods because when you save a copy as .csv it doesn’t preserve the formulas. So you will have two copies: the one you edit with the formulas and the one you save over and import.
Hi,
thanks for that suggestion, tmbg. That’s a really sophisticated way of using Excel formulas, from what I can see. Maybe it helps.
Regards,
Tobias
Thread Starter
danant
(@danant)
Thanks Tobias for the answer – I guess there will be no easy fix for this in the Extension.
and
Thanks tmbg for the suggested solution. I will look into this but I suspect there will probably be some difficulties since I use the shortcodes in url-parameters.
Anyway, I should edit my tables in Excel since they have become quite complex.
Regards,
Dan
Hi Dan,
no, sorry, there’s no easy fix in the Extension here 🙁
Note that using Shortcodes in URLs (if you are using those inside the HTML code for a link) is not recommended by WordPress anymore and might even break in future versions of WordPress. For more details, see https://make.wordpress.org/core/2015/08/30/shortcodes-roadmap/
Regards,
Tobias