View previous topic :: View next topic |
Author |
Message |
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:04 pm Post subject: |
|
|
Ok, I can understand that. But why does that work with beta 1?
But yeah, I will create a function for it Not my main goal, but better then nothing |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 9:11 pm Post subject: |
|
|
Nothing has has changed there. Are you sure that you did use it in child {block} sections before? |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:16 pm Post subject: |
|
|
U.Tews wrote: | Nothing has has changed there. Are you sure that you did use it in child {block} sections before? |
I wanted to say yes, but you're right. I call the template directly for testing purpose, I forgot that. Oops again
But thnx for your help, I will try to create a function for this |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 9:21 pm Post subject: |
|
|
I'm just looking if the {block} compiler could be changed.
Hold the line for a moment.... |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:25 pm Post subject: |
|
|
Ow, thnx
I know you think my approach is wrong, but I don't know any other way to calculate width and height just once and not on any page call. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 9:31 pm Post subject: |
|
|
The change in now in the SVN.
Please test. |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:38 pm Post subject: |
|
|
Works just fine ! Thnx |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:45 pm Post subject: |
|
|
I just noticed something else .. Is it possible that the nocache does not work anymore on included files, or files that extend another file.
The same setup as for static_image, but with caching = 2.
container.tpl, test.tpl and test_a.tpl all three have {$smarty.now nocache}. Only the one in container.tpl updates every page refresh, in the other two files it stays the same. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 9:50 pm Post subject: |
|
|
I have to test that, may take a while. |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 9:51 pm Post subject: |
|
|
No problem, just to let you know |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 10:50 pm Post subject: |
|
|
The fix for nocache code within child {block} tags is in the SVN now. |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Thu Nov 12, 2009 11:16 pm Post subject: |
|
|
It works now, except one thing. If I use a nocache include {include file="test.tpl" nocache}, then I cannot use {$smarty.now nocache} in the test.tpl template. It will just display nothing then. When I use {$smarty.now} it is visible. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Nov 14, 2009 4:19 pm Post subject: |
|
|
The fix is in the SVN now. |
|
Back to top |
|
caoimhin Smarty Rookie
Joined: 08 Nov 2009 Posts: 24 Location: Lebbeke, Belgium
|
Posted: Mon Nov 16, 2009 8:34 am Post subject: |
|
|
Looks ok now, thnx ! I have another question, I will put it here but if you want me to create a new topic for that I will do that.
If I want to create a function with an unknown number of arguments, and I want them to use like {myFunction 1="abc" 2="def"}some text %1 %2{/myFunction}, how can I do that? And I noticed that I cannot use numeric values too. It's because I want to create a sprintf kind of function for Smarty |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Nov 16, 2009 9:25 pm Post subject: |
|
|
I will enable the numeric values during the next couple of days. |
|
Back to top |
|
|