I created a table that retrieves data via a foreign key (string) from a 2nd table called "class" and it's column "icon" (which is an image-type column).
But now it shows the URL of the image in the 1st table. How do I change it, so it shows the image itself?
Hi,
I created a table that retrieves data via a foreign key (string) from a 2nd table called "class" and it's column "icon" (which is an image-type column).
But now it shows the URL of the image in the 1st table. How do I change it, so it shows the image itself?
Hi Ron,
Unfortunately, something like this will not be possible,
if the Column is set as Image in your Foreign Table.
-
Because with our foreign key feature, you can only use a String Type Column and you create your relation,
but the way how our Image Column renders images is different from the way our String Column renders images.
-
In our Image column, our Plugin automatically 'wraps' your link towards the image in an image HTML Tag to load the actual image in the cell,
while in a String Column,
you would need to manually make Custom HTML image tag , and wrap your link towards the image inside it.
So, something like :
-
So at this time, the only solution if you want to use a foreign key relation but to show it as an Image,
can be to change your foreign Column from the source table from Image to String type
and you will have to modify each cell to wrap the image link inside HTML img tags.
Then when you call it in this table, the foreign column can render images in this way.
If you also need to add a thumbnail, you will need to manually add it via Custom HTML.
If you don't know how that is done, you can see this tutorial here How To Create a Thumbnail Image.
I hope that helps.
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
OK, very clear, thanks. I will change the way I set up my tables.
Hi Ron,
you're welcome, i am happy to help.
Anything else that we could assist with, please don't hesitate to create new tickets.
Thank you.
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