Re: [PHP Template] load template from string var
| From: | Andrei Zmievski | Date: | Tue, 14 Mar 2000 03:54:20 +0000 |
| Subject: | Re: [PHP Template] load template from string var | ||
| References: | 1 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-313@lists.php.net to get a copy of this message | ||
At 06:30 PM 3/13/00 -0600, Jeremiah Bellomy wrote:
>This may already be possible with the current API but I couldn't tell for
>sure from the spec file, so here goes:
>
>I just wanted to be sure that it's possible to load a template from the
>contents of a PHP variable as well as from files. This allows for the
>possibility of storing templates in a database so that for example, I could
>load $my_template from the database and then make it a template with
>something like:
>
>tmpl_load_from_var(resource tmpl, string varname)
> Loads a template from the contents of a string.
>
>tmpl_load_from_var('my_template.tpl', $my_template);
>
>
>So, is this possible by some other means currently defined in the spec?
Yes, this will definitely be possible. Sorry I haven't updated the spec
yet, currently busy working out the code for sections.
-Andrei