|
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 |
Margodth Smarty Rookie
Joined: 28 Mar 2004 Posts: 11
|
Posted: Fri Jul 08, 2011 10:16 am Post subject: spaces |
|
|
Today I've made the upgrade from version 2.6 to 3.0.7.
I've seen a lot of changes but my entire site stop running. No messages of errors and the header, menu and footer was working, so I had no Idea what was wrong.
All my templates have this line and did not show anything:
Code: | <tr {if $row.Active == "0" }class="rowDeleted"{else}
bla bla bla
/if}>
|
The Fix:
Code: | <tr {if $row.Active == "0"}class="rowDeleted"{else}
bla bla bla
/if}>
|
Big diference? only a white space between "0" and }.
Is this a bug?
Apart from this little issue Smarty 3 rocks! Thanks a lot! |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Fri Jul 08, 2011 10:46 am Post subject: |
|
|
smarty3 treats delimiters surrounded by whitespace as if they were surrounded by {literal}. This should simplify working with inline CSS and JS a lot. so no, this is not a bug. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Jul 08, 2011 10:49 am Post subject: |
|
|
This problem is related to the new auto litereal option. See section
-Delimiters and whitespace- in the SMARTY2_BC_NOTES.
I mixure like {tag } no whitepace at opening tag but whitespace at closing tag was invalid up to version 3.0.7.
Since 3.0.8 {tag } is valid tag syntax. |
|
Back to top |
|
Margodth Smarty Rookie
Joined: 28 Mar 2004 Posts: 11
|
Posted: Fri Jul 08, 2011 11:32 am Post subject: |
|
|
Smarty 3.0.8 solved the problem without touching a single line of code.
Thanks for the answers. |
|
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
|