Re: My template idea...
[email protected] (Andrei Zmievski)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 15 Feb 2000, Tobias Ratschiller wrote:
> But it may be worthwhile to have the template system independent of files -
> to allow it to also start from strings:
> resource tpl_load_from_string(string string [, string path_to_configs])
> - loads a template from a string and performs initial parsing which
> includes replacing the config variables with their values, stripping
> comments, and
> printing out {%..} constructs.
Yes, definitely. I thought of the same thing after posting the document
and just hasn't had a chance to modify it yet.
What do you think about the template support for config files? Is it
necessar or not? Would it be better for the developer to load config
file manually and do something like tpl_assign_config() on the template?
A disadvantage I see with it is that it will be impossible for included
templates to override parent's config values.
-Andrei
What's hard, in hacking as in fiction,
is not the writing, it's deciding what to write.
-- Neal Stephenson