I’m wanting to use a placeholder (generated from the PPP snippet) to insert postcodes into the
&zip parameter so that I can include a map on each profile showing the member’s location.
Example:
However, Googlemaps displays the incorrect continent!
The (Googlemap) snippet is receiving the correct postcode, however, when it
urlencode’s it (within
geocode function (bottom of snippet)), it is encoding the placeholder name, not its value:
Example:
Placeholder [+zip+] contains value:
ch14nl
Function geocode($postcode) receives the value
ch14nl (In the
$postcode variable)
But
urlencode($postcode) outputs:
I’ve tried commenting-out the urlencode line but Googlemaps still displays incorrect location.
It seems urlencode is interpreting the placeholder name, but not its value. (Not a urlencode problem - See next post)
Any ideas?
Running ModX v0.96
(I’m not sure if this is a general ModX question but as I "found" it using this snippet...)