In my application that aggregates data, I include a column with a list of urls to the source files the data for that row came from; the number of possible URLs is currently not bound. I can easily turn the text in the cell into a single link using a HTMLTemplateFormatter ( and a background color specified in another column in the same row ) with:
template_url = ""<div style="background:<%=Color%>;text-align:left";> <a href="<%= value %>“target=”_blank"><%= value %> </a> </div>""
formatter_url = HTMLTemplateFormatter(template=template_url)
If I have the value of the cell as http://example1.gov
, I get the expected link to example1.gov.
If I have the value of the cell as http://example1.gov ~ http://example2.gov
, I get the full string as a link to example1.gov.
Is there a way for me to split the value in the cell on a separator into multiple hrefs, such that the second example has 2 separate links going to the 2 separate destinations?
I am currently pre-encoding the URLs with %20 for space, etc. Is there a way to make the displayed version pretty?