|
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 |
kevincam Smarty n00b
Joined: 26 Oct 2003 Posts: 2
|
Posted: Sun Oct 26, 2003 6:03 pm Post subject: Speed of assign() vs. $smarty.const._FOO |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun Oct 26, 2003 9:59 pm Post subject: |
|
|
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 |
|
Back to top |
|
kevincam Smarty n00b
Joined: 26 Oct 2003 Posts: 2
|
Posted: Sun Oct 26, 2003 10:16 pm Post subject: |
|
|
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 |
|
|
|
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
|