• Resolved jscmal

    (@jscmal)


    Hi,
    The shortcode, in the way it is normally used, returns a string with HTML tags.

    is there a possibility to use the shortcode to fill an array (OR a multidimensional array [x, y] when necessary) with the data of the table?

    I was considering this possibility for the case where there is repetitive use of a group of data from the table, on the same page.

    I see that there are some Filters in the guide. I already use the filter “gdoc_table_html” to apply an URL to specific data in the table. But I don’t know in which way I can fill an array or how to use the filters (or other things) for this purpose.

    Kindly, can you give indications about how to fill an array with data of a table?

    Thank you for your support.

    Kind regards

    G. Aloe

    • This topic was modified 5 years, 10 months ago by jscmal.
    • This topic was modified 5 years, 10 months ago by jscmal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Meitar

    (@meitar)

    That sort of thing is just a couple lines of PHP, there’s no reason to use this plugin to do that and I wouldn’t recommend it.

    Thread Starter jscmal

    (@jscmal)

    The main reason is that:

    if on a page, I use the shortcode many times, even going to take data from the same spreadsheet that has complex series formulas, all the times, but for different columns, the loading of the page increases with the increase of the use of the shortcode.

    Then, maybe in this circumstance, only one query, that gets data from all the required columns, can be better than make many queries. Later it is possible to use only the necessary data, from the array, for every table view to show on the page.

    I developed functions to make a test, starting from data provided by the shortcode. They work. But this goes over the purpose of the plugin.

    • This reply was modified 5 years, 9 months ago by jscmal.
    • This reply was modified 5 years, 9 months ago by jscmal.
    • This reply was modified 5 years, 9 months ago by jscmal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use the shortcode to return data table usable to fill an Array[x, y] ?’ is closed to new replies.