Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags
| From: | Monte Ohrt | Date: | Wed, 04 Sep 2002 21:40:30 +0000 |
| Subject: | Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-259@lists.php.net to get a copy of this message | ||
Yes and no...
First off, {insert} was a hack plain and simple. We needed a syntax that the template engine recognized as being not cached. I don't think designers care that the insert tag is cached or not, it doesn't directly affect their design. It actually just adds confusion, the insert tag should really be an {include ...} tag including a template that the designer can edit.
I do see the issue with breaking templates up into cached/non-cached pieces, I don't like the idea of splitting them up just for the purpose of caching either. Maybe a cache/nocache block function is necessary.
Monte
Jason Sweat wrote:
Just to play Devil's Advocate, aren't you now making the designer intimately aware of the caching because of the insert function? Since I typically play both the developer/designer roles, I am having a hard time concieving of a designed who was not well aware of the caching requirements for the page. I lean towards the side of {no_cache}...{/no_cache} myself, but I can see the merits of the function registered version as well. Jason I see the merits of having tags in the templates that control caching, I'm just outlining my first concerns. My gut instinct says no, this isn't nearly as manageable. Keep the templates clean and simple, don't clutter them with cache constructs. Let the application handle that. Monte __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.