 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
cconstantine Smarty n00b
Joined: 16 Sep 2008 Posts: 3
|
Posted: Mon Oct 13, 2008 1:37 pm Post subject: How to use .conf variables in java scr |
|
|
| How to use .conf variables in java script file |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7036 Location: Lincoln Nebraska, USA
|
Posted: Mon Oct 13, 2008 2:25 pm Post subject: |
|
|
| Use {ldelim} and {rdelim} to escape braces instead of putting a {literal} block around the whole thing. Then smarty tags will work in the javascript. |
|
| Back to top |
|
cconstantine Smarty n00b
Joined: 16 Sep 2008 Posts: 3
|
Posted: Thu Oct 23, 2008 8:34 pm Post subject: please give me an example |
|
|
| please give me an example |
|
| Back to top |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Fri Oct 24, 2008 8:17 am Post subject: |
|
|
| Code: | <script ...>
function foo() {ldelim}
alert('boo');
{rdelim}
</script> |
_________________ Darn computers always do what I tell them to instead of what I want them to do. |
|
| Back to top |
|
cconstantine Smarty n00b
Joined: 16 Sep 2008 Posts: 3
|
Posted: Fri Oct 24, 2008 11:59 am Post subject: How to using vars in .conf !!! |
|
|
<script ...>
function foo() {ldelim}
alert({#city#});
{rdelim}
</script>
This is not working when city is defined in .conf file |
|
| Back to top |
|
bimal Smarty Elite

Joined: 19 Apr 2007 Posts: 419 Location: Kathmandu, Nepal
|
|
| 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
|