Add hyperlinks to column specific to value

Add hyperlinks to column specific to value

nat5142nat5142 Posts: 20Questions: 7Answers: 0
edited July 2017 in Free community support

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

  • kthorngrenkthorngren Posts: 21,311Questions: 26Answers: 4,948
    Answer ✓

    you can use columns.render. The doc page has some exmples shwoing you to create links.

    Kevin

This discussion has been closed.