Re: [SMARTY-DEV] Newlines

From: Date: Thu, 04 Apr 2002 19:34:57 +0000
Subject: Re: [SMARTY-DEV] Newlines
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-29@lists.php.net to get a copy of this message
Actually we could make this work, just use HTML sytle tags: <notrim> ... </notrim> Then in the postfilter, we could remove these tags and not apply the filter to any content in between. Thoughts? Or better tag name? <notrimwhitespace> seems a bit lengthy. Monte Jason Sweat wrote:
So that takes care of the need to eliminate the postfilter for an entire template. If you needed to have the functionality to prevent the trimming from just a portion of the template, that you did not want to have <pre>ed, could a block function be written that would allow the template designer to: {notrimwhitespace}
this is     my
stuff not to trim {/notrimwhitespace} then the block function could drop whatever markings you wanted the postfilter to identify, and those could also be removed from the final output. I don't have a need for such functionality myself, I think the unregister_postfilter combined with {strip} does everything I need, but I thought this idea had at least a little merit. Jason --- Andrei Zmievski <andrei@ispi.net> wrote:
On Thu, 04 Apr 2002, Jason Sweat wrote:
Monte> Any thoughts on this? I would agree with Andrei's thoughts on not controlling a plugin with comments in the
template.
Could we instead have something like the old Smarty->Register() function where you could: $template->plugin('trimwhitespace',false); <-
second
parameter for enable/disable at the script level? Or is it possible to
unregister
the postfilter now on a per script basis?
You can unregister postfilers, see unregister_postfilter(). -Andrei "The only true currency in this bankrupt world is what we share with each other when we're uncool." -- Lester Bangs, from the film 'Almost Famous'
__________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.dev (#29) next »