Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smart var inside Javascript for Google Map

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
alouty
Smarty Rookie


Joined: 07 Sep 2012
Posts: 8

PostPosted: Fri Sep 07, 2012 3:20 am    Post subject: Smart var inside Javascript for Google Map Reply with quote

Not sure how to put smarty var to the address in smarty template file...

http://gmap.nurtext.de/documentation.html
------------------------------------------------------
{$listing.City}
{ldelim}
<script type="text/javascript">
//<![CDATA[
$(document).ready( function() {
$("#map").gMap({
markers: [{


// latitude: 51.34299898,
// longitude: -0.77635505,
address: "{$listing.City}",
html: "_address",
popup: false

}],
zoom: 10
});
});
//]]>

</script>
{/ldelim}
<div id="map" style="width:247px; height:247px;"></div>
<!-- END Google Map-->
-------------------------------------------
Back to top
View user's profile Send private message
alouty
Smarty Rookie


Joined: 07 Sep 2012
Posts: 8

PostPosted: Fri Sep 07, 2012 5:07 am    Post subject: Reply with quote

Instead of {ldelim}, I have put many {literal} and {/literal} for any smarty var...

Any way to replace them?
Back to top
View user's profile Send private message
alouty
Smarty Rookie


Joined: 07 Sep 2012
Posts: 8

PostPosted: Mon Oct 08, 2012 4:10 am    Post subject: Reply with quote

Solved. I will put {literal}{/literal} until the smarty var then again after the smarty var...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP