0

Trying to change the HTML of the 'click' infoWindow causes the header text to disappear.

I've got an infoWindow configured to display correctly.

I'd like to use the 'email' field in my table as a hyperlink on the 'email' text.

However, whenever I add the <a href="mailto:{{email}}">{{email}}</a> tag, then click 'apply' (or CTRL+S) to save the changes, the header in the infoWindow disappears. (the email link works just fine...)

My full 'custom' HTML is below:

<div class="cartodb-popup header green">
  <a href="#close" class="cartodb-popup-close-button close">x</a>
  <div class="cartodb-popup-header">
  </div>
  <div class="cartodb-popup-content-wrapper">
    <div class="cartodb-popup-content">
      <h4>city</h4>
      <p>{{city}}</p>
      <h4>email</h4>
      <p><a href="mailto:{{email}}">{{email}}</a></p>
    </div>
  </div>
  <div class="cartodb-popup-tip-container">
  </div>
</div>
1

We have fixed the problem and it should be ready today or tomorrow.

https://github.com/CartoDB/cartodb/commit/425b6af8c8c728490c12763c4ce6dfb4f8df263d

Thanks a lot for your feedback! :)

1

I think you have hit a bug when using a template with a header. When you switch to html editing it does not create the right html and it removes the header. I will report it.

Meanwhile is just adding it on the HTML and it will be ok. Here is your code:

<div class="cartodb-popup header green">
  <a href="#close" class="cartodb-popup-close-button close">x</a>
  <div class="cartodb-popup-header">
    <h1>{{fielf_for_header}}</h1>
  </div>
  <div class="cartodb-popup-content-wrapper">
    <div class="cartodb-popup-content">
      <h4>city</h4>
      <p>{{city}}</p>
      <h4>email</h4>
      <p><a href="mailto:{{email}}">{{email}}</a></p>
    </div>
  </div>
  <div class="cartodb-popup-tip-container">
  </div>
</div>

So as you can see it is about adding <h1>{{field_for_header}}</h1>.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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