Reply To: MashUp -> Link from Post to MashUp

Home Forums MapPress Support MashUp -> Link from Post to MashUp Reply To: MashUp -> Link from Post to MashUp

#18855
Chris
Keymaster

Hi,

The template variables are actually output from JavaScript. So it’s not possible to use things like {{poi.title}} in PHP functions.

However, it is possible to trim spaces from the title using the JavaScript trim() function, like this:
<div class='mapp-title'><# print(poi.title.trim()); #></div>

There is some more information in the MapPress documentation, or this page explains more about JavaScript templates in general:
https://codex.wordpress.org/Javascript_Reference/wp.template