|
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 |
st Smarty n00b
Joined: 20 Feb 2010 Posts: 2
|
Posted: Sat Feb 20, 2010 11:43 pm Post subject: |
|
|
mohrt wrote: | are you using the latest SVN? also, why not just:
{if isset($smarty.post.login)} |
No, just beta7. But I will try SVN tomorrow.
I use array_key_exists() because I got used to it It seems "cleaner" and does not behave exactly the same as isset().
Did you see my question about GSOC?
Edit: I just tried SVN revision 3504 (the newest by now) and the odd behaviour is still there. But I found out what was causing it: Cache was set to true, so the output was cached and was not refreshed on a browser refresh. Apparently Smarty's behaviour changed in that point.
I probably should use {nocache} and the third parameter of Smarty::assign() a little bit more
Thanks for the help. |
|
Back to top |
|
httpete Smarty Rookie
Joined: 05 Dec 2009 Posts: 27
|
Posted: Thu Feb 25, 2010 11:05 pm Post subject: Good Results |
|
|
Gents,
Just reporting in about the latest version from SVN, today we discovered that smarty 3 beta 3 would not do e.g.:
{$array.$key1.$key2}
and my boss freaked and almost threw me out the window.. Luckily I updated to the latest and it works perfectly. Nice work guys. I also notice that modifiers do work in IF statements now just fine (something that didn't work for the last few releases) when was that fixed?
Thank you much
</httpete> |
|
Back to top |
|
Martijn! Smarty n00b
Joined: 26 Feb 2010 Posts: 2
|
Posted: Fri Feb 26, 2010 11:19 am Post subject: |
|
|
I found a bug in "libs/plugins/modifier.escape.php".
On line 71:
Code: | if ($smarty->has_mb) {
|
This member doesn't exists. |
|
Back to top |
|
httpete Smarty Rookie
Joined: 05 Dec 2009 Posts: 27
|
Posted: Thu Mar 04, 2010 5:05 pm Post subject: includes with "scope" variable doesn't work anymor |
|
|
example:
Code: |
{include file=$filename scope="MYSCOPE"}
and in included file
{$scope} will be empty
|
any quick fix? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Mar 04, 2010 5:21 pm Post subject: |
|
|
At the {include} tag 'scope' is a reserved attribute name which can have 'parent', 'root' or 'global' as value and controlls the visibillity of variables assigned within the included template.
So you must choose another name |
|
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
|