[Templates] Templates in database
[prev]
[thread]
[next]
[Date index for 2004/08/30]
I'm trying to learn how to store my templates in a database
and use from there. I must be missing something simple, but
can't seem to get the variables to resolve.
I have a template like:
Dear [% emp_fname %]:
Your application requesting an ID has been approved.
If you have any questions, please contact the ID Administrator
at [% IDAdminEmail %].
Then I read it out of the database:
[% query = DBI.prepare('SELECT * FROM email WHERE emailid = ?') %]
[% FOREACH tmpl = query.execute('1') %]
[% email = tmpl.body %]
[% END %]
Then I display -- just to see what he's done:
<pre>[% email %]</pre>
He shows me the original template, but none of the template tags
(variables)
are resolved.
What am I doing wrong here?
/dennis
---------------------------------------------------------------------------
Office phone: 317.892.2241
---------------------------------------------------------------------------
If at first you don't succeed, don't go skydiving.
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] Templates in database
Dennis Daupert 20:24 on 30 Aug 2004
|