Re: [PHP Template] Another batch of ideas
[email protected] (Dan Libby) Fri, 18 Feb 2000 14:06:39 -0800
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
Andrei Zmievski wrote: > On Fri, 18 Feb 2000, Dan Libby wrote: > > > - Assigning values to vars inside a specific section. I'm not sure if > > > this would be useful or not. > > > > couldn't hurt. shouldn't be hard to do. > > I don't see how this can be useful in our case. In HTML::Template the > variables mentioned inside the section are local to that section, so it > makes sense for them to assign to a specific section. We sort of have > global variables. ok. > Another point this brings up. What if a variable that has multiple > values is printed outside the section? I think it should just print the > first value. In my implementation, there is no "outside". Everything is a section. The main body of the page is an implicit section, so if there are looping variables, the whole body loops. I'm not claiming that is necessarily "correct", however it was easier just to treat everything the same. I do think that we should add min and max attributes to the section tag to control the range of the loop. > > Yeah, I think it should default to doc_root unless ini setting is in effect. > > In the just updated spec I said we'd have tmpl.search_path setting which > lists the possible directories for templates and defaults to . if not > specified. I'll go rtfm. ;-) > I suppose we'll need a way to modify these .ini settings. You can do it > using ini_alter(), but should we have tmpl_set_ini() or something? no. redundant, imho.