|
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 |
metalkid Smarty Rookie
Joined: 28 Mar 2009 Posts: 5
|
Posted: Sat Mar 28, 2009 3:08 am Post subject: {literal} |
|
|
In smarty3 can we look into dropping this for javascript blocks? Wouldn't it make sense to automatically literal out anything between <script> tags? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Mar 28, 2009 3:20 am Post subject: |
|
|
smarty 3 already ignores braces that are surrounded by non word characters, so something like:
Code: | function foo {
....
} |
will not need literal tags. this pretty much covers it for javascript and css, unless it somehow resembles smarty tags like {foo ...} or {$foo}
Last edited by mohrt on Sat Mar 28, 2009 3:36 am; edited 1 time in total |
|
Back to top |
|
metalkid Smarty Rookie
Joined: 28 Mar 2009 Posts: 5
|
Posted: Sat Mar 28, 2009 3:35 am Post subject: |
|
|
ah very nice... drove me nuts, especially when i used smarty vars in the js, had literal tags everywhere |
|
Back to top |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Mon Mar 30, 2009 3:10 am Post subject: |
|
|
great!
So does that mean i don't need to redifine smarty delimiters to "{{" and "}}"? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Mar 30, 2009 3:14 am Post subject: |
|
|
yarco wrote: | great!
So does that mean i don't need to redifine smarty delimiters to "{{" and "}}"? |
Probably not. |
|
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
|