Add hyperlinks to column specific to value
Add hyperlinks to column specific to value
Using Python's Flask microframework, I've created a simple webpage that uses server-side processing to load new DataTable records on user input. I'd like for the values in the column labeled "ICAO ID" to contain hyperlinks to a flask route (@app.route('/station/<_id>')) where the value of _id corresponds to the hyperlinked text. I'd like the same to work for states, so that if a user were to click on "CA" in the States column, they would be rerouted to a separate page, '/state/CA'.
Is there an easy way to do this with DataTables? If so, I'm having trouble finding it.
This question has an accepted answers - jump to answer
Answers
you can use
columns.render
. The doc page has some exmples shwoing you to create links.Kevin