Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags
| From: | Jason Sweat | Date: | Wed, 04 Sep 2002 22:13:13 +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-260@lists.php.net to get a copy of this message | ||
I did like the thought process behind Gerard's
registration of variables as cached/not cached as
well. I have written inserts that did nothing but
echo the current user's name before, might be nice if
you could just do $tpl->assign_dynamic('user'...);
or some such...
It sounds very much like not enough thought has gone
into the redesign yet :)
Jason
--- Monte Ohrt <monte@ispi.net> wrote:
> 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.
>
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com