I configured the Master-Detail plug-in to display details in a page. On that detail page I inserted shortcode for another wpdatatable. The wpdatatable sub-table uses a placeholder (%VAR1%). The placeholder needs to use a variable passed by Master-Detail. How do I reference this variable?
For example, my current shortcode is [wpdatatable id=7 var1=%filingnumber%] where filing number is a field passed by Master-Detail. This does not work. I can display %filingnumber% as text but I can't figure out how to get it to resolve properly in the shortcode. Any ideas?
You can filter the var with the hook wpdatatables_before_get_table_metadata where the data will be forwarded from POST, where you'll find all data from MasterDetail
I configured the Master-Detail plug-in to display details in a page. On that detail page I inserted shortcode for another wpdatatable. The wpdatatable sub-table uses a placeholder (%VAR1%). The placeholder needs to use a variable passed by Master-Detail. How do I reference this variable?
For example, my current shortcode is [wpdatatable id=7 var1=%filingnumber%] where filing number is a field passed by Master-Detail. This does not work. I can display %filingnumber% as text but I can't figure out how to get it to resolve properly in the shortcode. Any ideas?
Hello Mike
I'm not sure you can do that with the current built-in features of the add-on.
I have forwarded your question to one of our developers, and I'll get back to you as soon as he takes a look at it.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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 again Mike
You can filter the var with the hook wpdatatables_before_get_table_metadata where the data will be forwarded from POST, where you'll find all data from MasterDetail
You can take a look at this ticket on how to filter the shortcode:
https://tmsplugins.ticksy.com//ticket/2449620/
This is the only way because the shortcode is executed before the content on the page or post.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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