Hi,
I searched the forums and I can’t believe there is no solution to my problem.
I installed “Insert PHP Code Snippet”-Plugin. So I can get data from a database-table and echo it.
However I can’t dynamically fill an avia-table.
I tried do shortcode, but it doesn’t output anything.
There must be a way to fill tables with data dynamically. How?
Thank you very much.
echo do_shortcode("[av_row row_style='' av_uid='av-3llhtc']".do_shortcode("[av_cell col_style='avia-highlight-col' av_uid='av-3f73u0']Partner 1[/av_cell]") . do_shortcode("[av_cell col_style='' av_uid='av-367840']") . "Anschrift 1, 12345 Berlin" .do_shortcode("[/av_cell]") . do_shortcode("[/av_row]"));
Hey maxh_muc,
Thank you for using Enfold.
Out of the box there is no easy way.
What you have to do is create the complete shortcode av_table and then call do_shortcode with this string.
Please enable debug mode by adding the code provided in this link to your functions.php file which can be accessed from Appearance > Editor
This lets you view the shortcode for all the page elements.
The following steps can give you an idea how to do it:
– Create an empty page
– Add a new table element (in the debug window you see the shortcode for this “empty” element)
– Select the options as if you would enter the table manually – this will set all shortcode attributes for the table
– Add a single line and style it (this will set all shortcode attributes for a single line
– The shortcode in the debug window is the frame.
– Now your script must add all lines using av_row as “template” for a single line.
– The final string (av_table – av_row …. – /av_table ) can be passed to do_shortcode().
Hope this helps you.
Best regards,
Günter