|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
alouty Smarty Rookie
Joined: 07 Sep 2012 Posts: 8
|
Posted: Fri Sep 07, 2012 3:20 am Post subject: Smart var inside Javascript for Google Map |
|
|
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 |
|
alouty Smarty Rookie
Joined: 07 Sep 2012 Posts: 8
|
Posted: Fri Sep 07, 2012 5:07 am Post subject: |
|
|
Instead of {ldelim}, I have put many {literal} and {/literal} for any smarty var...
Any way to replace them? |
|
Back to top |
|
alouty Smarty Rookie
Joined: 07 Sep 2012 Posts: 8
|
Posted: Mon Oct 08, 2012 4:10 am Post subject: |
|
|
Solved. I will put {literal}{/literal} until the smarty var then again after the smarty var... |
|
Back to top |
|
|
|
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
|