Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Template {function} becomes a real template function

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
vorapoap
Smarty Rookie


Joined: 22 Dec 2009
Posts: 32

PostPosted: Fri Dec 17, 2010 3:53 pm    Post subject: Template {function} becomes a real template function Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Dec 17, 2010 4:17 pm    Post subject: Reply with quote

{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
View user's profile Send private message
vorapoap
Smarty Rookie


Joined: 22 Dec 2009
Posts: 32

PostPosted: Mon Dec 20, 2010 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Tue Dec 21, 2010 8:15 am    Post subject: Reply with quote

Have you tried to use eval to force compiling once again?

http://www.smarty.net/docs/en/language.function.eval.tpl
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Dec 21, 2010 1:48 pm    Post subject: Reply with quote

elpmis wrote:
Have you tried to use eval to force compiling once again?


This reply is out of topic.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP