|
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 |
vorapoap Smarty Rookie
Joined: 22 Dec 2009 Posts: 32
|
Posted: Fri Dec 17, 2010 3:53 pm Post subject: Template {function} becomes a real template function |
|
|
I just think that this would be more convenient.
Another thing that you won't be able to use a parameter with name = "name" since name is a parameter for {call ...}
So why create a complexity of {call name="xxx" ...} if we can do {xxx} |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Dec 17, 2010 4:17 pm Post subject: |
|
|
{call name="xxx" ...} is necessary if you want to call a template function which is defined external in an subtemplate.
The compiler can not know otherwise that {xxx} should compile into a template function call.
name can anyway not be a parameter as it's also the attribute for the function name at {function} definition. |
|
Back to top |
|
vorapoap Smarty Rookie
Joined: 22 Dec 2009 Posts: 32
|
Posted: Mon Dec 20, 2010 7:12 pm Post subject: |
|
|
Hmm. I guess that this is because that Smarty does only a single phase template compilation... If for any reasons in the future, Smarty will go for double phases, please consider this.
Thank you |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Dec 21, 2010 1:48 pm Post subject: |
|
|
elpmis wrote: | Have you tried to use eval to force compiling once again?
|
This reply is out of topic. |
|
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
|