2

Perhaps a basic question, but can php code be used in editing the CartoDB infowindow HTML? We want to show or hide a category depending on the value.

asked Aug 4, 2015 at 19:54

1 Answer 1

2

Yes, you can do it. Just render the HTML you need in the view and "inject" that code in the visualization infowindow template. For example:

...
 layer.infowindow.set('template', document.getElementById('infowindow_template'));
...
answered Aug 7, 2015 at 10:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.