View previous topic :: View next topic |
Author |
Message |
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Jan 11, 2010 10:37 pm Post subject: Smarty 3 beta 6 released |
|
|
The sixth beta of Smarty 3 has been released! A lot has been going on since the last beta, be sure to get updated. Please join the developer mailing list and see the Smarty 3 section of the forums and give us feedback!
http://www.smarty.net/ |
|
Back to top |
|
httpete Smarty Rookie
Joined: 05 Dec 2009 Posts: 27
|
Posted: Tue Jan 12, 2010 5:09 pm Post subject: Difference between smarty 3 beta 5 and beta 6 |
|
|
In beta 5 this worked:
{if $smarty.request.showonlynew|strtolower eq 'on'}
In beta 6 it needed:
{if strtolower($smarty.request.showonlynew) eq 'on'}
This is a major factor for us, as it changes behavior from smarty 2 substantially. Can someone let me know what the final decision on the behavior is? I have so many cases using modifiers in if statements, this might block my adoption of Smarty 3. I feel this is a major difference from 2 behavior. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Jan 12, 2010 5:22 pm Post subject: |
|
|
it will get fixed |
|
Back to top |
|
httpete Smarty Rookie
Joined: 05 Dec 2009 Posts: 27
|
Posted: Tue Jan 12, 2010 5:32 pm Post subject: |
|
|
Thank you very, very much. I am stabilizing against beta 5 behavior right now. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Jan 12, 2010 7:20 pm Post subject: |
|
|
Sorry
I did screw up the parser just before the release of beta 6.
The SVN is now updated with a version which does work with same
restriction as the SVN versions before.
The restrictions is:
If modifiers are used in {if...} or mathematical expressions you must
use parentheses like
{if ($products|@count) == 2}
{if ($newsitem.news_date|date_format:"%Y") == 2008}
{$x = ($y|strlen) + ($z|strlen)}
I will try to remove this restriction ASAP.
Uwe |
|
Back to top |
|
dustinb Smarty Rookie
Joined: 20 Feb 2009 Posts: 12
|
Posted: Thu Jan 14, 2010 6:47 pm Post subject: $smarty.cookies |
|
|
Seems in beta 6 $smarty.cookies broke. I went back to beta 4 where it was working because that's the last version I was last using.
Not really any detail to give $smarty.cookies.something doesn't show anything in 6 but does in 4 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Jan 14, 2010 7:13 pm Post subject: |
|
|
The fix for $smarty.cookies is in the SVN now. |
|
Back to top |
|
legende Smarty n00b
Joined: 17 Jan 2010 Posts: 3
|
Posted: Sun Jan 17, 2010 1:30 pm Post subject: |
|
|
PHP
define 'MYCONSTANT', '100'
Code in smarty template
{$const="{$smarty.const.MYCONSTANT}"}
{$const}
produces in beta6: {@MYCONSTANT}
produces in beta5: 100 |
|
Back to top |
|
djmassive Smarty n00b
Joined: 17 Jan 2010 Posts: 3
|
Posted: Sun Jan 17, 2010 3:41 pm Post subject: |
|
|
In Smarty3 B6:
{include file="`$smarty.const.MYCONST`modules/file.tpl"}
gives error:
Code: | Fatal error: Uncaught exception 'Exception' with message 'Unable to load template file '`@_URL_MAIN`/templates/menu.smarty'' in C:\wamp\www\Alsmart\admin\classes\smarty\sysplugins\smarty_internal_template.php:169 Stack trace: #0 C:\wamp\www\Alsmart\admin\classes\smarty\sysplugins\smarty_internal_template.php(513): Smarty_Internal_Template->isExisting(true) #1 C:\wamp\www\Alsmart\admin\cache\a5ee3086d3e25b6f9eb408edc9c5a861aadb3fe4.file.index.smarty.php(60): Smarty_Internal_Template->getRenderedTemplate() #2 C:\wamp\www\Alsmart\admin\classes\smarty\sysplugins\smarty_internal_template.php(405): include('C:\wamp\www\Als...') #3 C:\wamp\www\Alsmart\admin\classes\smarty\sysplugins\smarty_internal_template.php(517): Smarty_Internal_Template->renderTemplate() #4 C:\wamp\www\Alsmart\admin\classes\smarty\Smarty.class.php(308): Smarty_Internal_Template->getRenderedTemplate() #5 C:\wamp\www\Alsmart\admin\classes\smarty\Smarty.class.php(325): Smarty->fetch('C:/wamp/www/als...', NULL, NULL, NULL) #6 C:\wamp\www\Alsmart\admin\footer.ph in C:\wamp\www\Alsmart\admin\classes\smarty\sysplugins\smarty_internal_template.php on line 169 |
How to use predefined const with smarty 3 ?? Maybe this should be repaired ?? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Jan 17, 2010 3:55 pm Post subject: |
|
|
The fix for $smarty.const.... inside double quote strings is in the SVN now. |
|
Back to top |
|
|