On Sat, Jul 13, 2002 at 07:24:27AM -0700, Randal L. Schwartz wrote:
> For security and clarity's sake, can we use a different delimiter?
> Perhaps / for files, but (looking at keyboard) "=" for subcomponents?

The patch Doru originally sent me used '#', just as you would 
when referencing a named anchor in an HTML document.

   [% INCLUDE foo/bar#header %]
vs
   http://somewhere.com/foo/bar.html#header 

I liked the use of the '#' although it could potentially cause problems
being as it is also the TT comment delimiter.

   [% INCLUDE foo/bar#header  %]     # 'header' is block
vs
   [% INCLUDE foo/bar #header %]     # 'header' is comment

But in the end, I decided that it was better to intentionally blur
the distinction.  It's the uniform access principle at work again.
One day you want to define many blocks in one template, but the next 
you decide to split them out into many files in a directory.  TT should
continue to Do The Right Thing so that you don't have to go edit a whole
bunch of templates.  It's a storage neutral content specification (to coin 
a fancy phrase :-)

I admit that it may be too much magic for some people, which is why 
it's an optional feature, disabled by default.  

> Admittedly, you can't tell now whether [% INCLUDE foo %] means the file
> foo or the local block.  Maybe I've always felt a bit uncomfortable with
> that as well. {grin}

Again, that's an intentional feature, for the same kind of reason. 


A



Reply via email to