How to have multiple urls in a cell

How to have multiple urls in a cell

newfullusernewfulluser Posts: 7Questions: 3Answers: 0

Hi,

How can I add multiple urls to a cell?
I know how to add just one, it's as simple as having the html portion in javascript and getting just the url from mysql.

But having more than one in the same cell is a problem, because injecting raw html code from the database into datatables just doesn't work..

The end result in a cell should look like this:

Twitter Facebook YouTube

And each row would have differen urls and titles

I was able to do it a long time ago but unfortunately I cannot remember how I did it :/
Please comment below if you know how to archieve this, thanks!!

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @newfulluser ,

    The best bet is to look at columns.render, the examples there show how to put URLs into a cell. You may need to make an ajax call perhaps to get those values, or the best way would be if those URL are sent to the client along with the table data,

    CHeers,

    Colin

This discussion has been closed.