Adding a different image to every row
Adding a different image to every row
I am currently using datatables with server side processing and its fine, however I would like to add product logos to each respective row. Every row is a different product with various attributes per column, so it will be a different logo per row.
I have all the logos on the sever (files/png) and i am wondering if to save it to the database (mysql) and then render it or references it in place on the server to each row.
Now comes the hard part for me, because its server side processing I have no idea which file(s) ssp.class.php or Server-side script and where to start adding/editing the the relevant code.
any assistance would be greatly appreciated.
Answers
Hi @CrazyTester ,
If you just want to reference the files on the server, you can use
columns.render
to create a link to that file. That's likely to be easiest option.Cheers,
Colin
Thank you @colin, but how would I go about doing that for each row with a different image. Sorry but i am new to this.
Either you would calculate the image name based on data in another column (it might be the product name with spaces changed to underscores, for example), or if you can't, you'll need the server to return it.