Can you advise how I can pass variable to wpdatatables shortcode in post or page?
My situation is I have to render dynamic table (in term of row data) by passing variable data to the shortcode. I see that you have an example on how to pass variable in shortcode but it is a static variable on the post or page.
The problem is I would like to pass variable via querystring.
i.e. http://localhost?var1=data1&var2=data2.
In my post or page will have shortcode [wpdatatable id=1 var1= {getting value from querystring "var1"}]
In this way, I can dynamic rendering the table on the same post or page.
However, now I figured out how to make it happens. (since it seems this capability is not available in current version of your product.) I wish if you could add this capability it would be nice because it is something similar to ajax feature that you already have.
I think that would be a really good idea to make, at the same time I have a table where I would like to be able to filter it out when called by the shortcut, it would be very convenient to have placeholders here that could be used in the backend.
%var1% = Value and then place this placeholder, eg. could be used in a filter situation or anywhere else you want to give some flexibility to the frontend when showing the table.
The only way to do it now is using a SQL database, but a great table plugin
Hi
Can you advise how I can pass variable to wpdatatables shortcode in post or page?
My situation is I have to render dynamic table (in term of row data) by passing variable data to the shortcode. I see that you have an example on how to pass variable in shortcode but it is a static variable on the post or page.
Thank you.
Puriwat
Hi Puriwat,
Thank you for your purchase.
You can take a look at our documentation about placeholders where you can find some useful hints how you can pass the variable to a shortcode.
Hope this can help you out.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Bogdan,
Thanks for your reply. I have looked at the document but I can't figured out how to pass variable to page by using query string.
Can you give me some suggestion please?
Thank you.
Puriwat
HI Puriwat,
Can you please tell me are you trying to insert placeholders in the query or something else.
Correct me If i do not understand you correctly.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Bogdan,
The problem is I would like to pass variable via querystring.
i.e. http://localhost?var1=data1&var2=data2.
In my post or page will have shortcode [wpdatatable id=1 var1= {getting value from querystring "var1"}]
In this way, I can dynamic rendering the table on the same post or page.
However, now I figured out how to make it happens. (since it seems this capability is not available in current version of your product.) I wish if you could add this capability it would be nice because it is something similar to ajax feature that you already have.
But thank you for your reply.
Puriwat
HI Puriwat,
Sorry for misunderstanding.
Unfortunately you are right, something like this is not possible to achieve with the plugin built in features at the moment.
I wrote down your suggestion and added on our TODO list so hopefully we can implement it for our future updates of the plugin.
Thank you for sharing the ideas and suggestion with us and sorry for any inconvinience.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I think that would be a really good idea to make, at the same time I have a table where I would like to be able to
filter it out when called by the shortcut, it would be very convenient to have placeholders here that could be used
in the backend.
%var1% = Value and then place this placeholder, eg. could be used in a filter situation or anywhere else you want
to give some flexibility to the frontend when showing the table.
The only way to do it now is using a SQL database, but a great table plugin
Reagards Morten