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

Speed of assign() vs. $smarty.const._FOO

 
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 -> General
View previous topic :: View next topic  
Author Message
kevincam
Smarty n00b


Joined: 26 Oct 2003
Posts: 2

PostPosted: Sun Oct 26, 2003 6:03 pm    Post subject: Speed of assign() vs. $smarty.const._FOO Reply with quote

I always use assign to pass constants to my smarty templates. I was wondering if it is any faster or better if I just use direct access to the constants via the Smarty Reserved Variable $smarty.const.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Oct 26, 2003 9:59 pm    Post subject: Reply with quote

I think of it as more of an access/api question. How do you want your template users to think of those values? Do you want them to use the $smarty var to access them or not? Worry not for speed: Smarty compiles Smile
Back to top
View user's profile Send private message
kevincam
Smarty n00b


Joined: 26 Oct 2003
Posts: 2

PostPosted: Sun Oct 26, 2003 10:16 pm    Post subject: Reply with quote

That is right, smarty does compile so no difference in speed, since I've been doing everything I hadn't thought about access/api for someone who would just be doing the html. In my opinion I think the assign would be better for a strictly html person. since they may not know what I define, I can always make an assign to whatever temp placeholder variable they used. Thanks for the quick feedback and response.
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 -> General 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