At 07:56 PM 04/16/02 +0100, Andy Wardley wrote:
>On Tue, Apr 16, 2002 at 11:03:03AM -0700, Bill Moseley wrote:
>> If I'm using TT to write out a TT template, is there a good way to escape
>> [% and %].
>
>Yep, you can do this:
>
>  [% stag = "[\%"
>     etag = "%\]"
>  %]

What's the logic for the backslash?  I would have expected 

  [% stag = "\[%"
     etag = "\%]"
  %]

Or more perlish

  [% stag = '[%'
     etag = '%]'
  %]


>
>and then:
>
>  [% stag; 'hello'; etag %]

Ok, that makes good sense.  I like that, thanks!


>Or:
>
>  [% TAGS star %]
>  [% INCLUDE foo %]   # not a directive, just plain text, passed through
>  [* INCLUDE foo *]   # is a directive

More work for the existing template.  It would be cool if TAGS was somehow
block scoped, although I can't see how you would END the block -- with new
or old tag?


Thanks!


-- 
Bill Moseley
mailto:[EMAIL PROTECTED]


Reply via email to