I have a set of text with links for a set of countries that I'd like to display on click in CartoDB. I've created a column "text" and it displays fine on click. The problem is that I can't show the links at all.

Is there a way to keep them active? The a href tag isn't working since the links are always at a different position within the text.

1 Answer 1


You can add the href tags directly inside the text in your table. In this way I built this visualization: http://asdfgh.cartodb.com/u/crb/viz/a65ba046-be68-11e4-b0f6-0e4fddd5de28/embed_map


My infowindow configuration is as follows, without using Custom HTML:

Infowindow config

Adding directly the HTML code in the columns would be the best approach if you're going to have different links in your text.

The other workaround would be splitting your text in as many columns you need in order to separate your "Text here LINK more text LINK text LINK" string as:

column1, LINK1, column2, LINK2, column3, LINK3
Text here, LINK, more text, LINK, text, LINK

which is not really a nice approach :-), but it would allow you to fix the href tags in the Custom HTML of the infowindows and insert {{link1}}, {{link2}} or {{link3}} inside of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.