Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags
| From: | Roberto Berto | Date: | Thu, 05 Sep 2002 02:47:14 +0000 |
| Subject: | Re: [SMARTY-DEV] Bringing the {insert} functionality to other tags | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-261@lists.php.net to get a copy of this message | ||
Monte,
Try use a character after { to not cache.:
{!if something}
{elseif ...}
{/if}
{!someblockfunction}
{/someblockfunction}
{!somefunction}
{!foreach}
{/foreach}
Maybe, add a registred nocache to tell the programmer choice whatever he
want to cache.
$registred_nocache = array(
"if","foreach","functionA",...
}
Printing the name:
{!$name}
{!$name|ucase}
On Wed, 04 Sep 2002 16:40:30 -0500
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.
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Atenciosamente,
---------------------------------------------------------
Roberto Bertó, Gerente de Projetos
Cel: 51 91169628
email: roberto@desenvolve.com.br
DESENVOLVE - http://www.desenvolve.com.br
TEL/FAX: 51 32270599 Rua Duque de Caxias, 1594 conj. 204
CEP 900010-281 - Porto Alegre - RS
---------------------------------------------------------