Assigning variables from resource plugins
| From: | Jan H. Andersen | Date: | Fri, 20 Aug 2004 22:53:48 +0000 |
| Subject: | Assigning variables from resource plugins | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11709@lists.php.net to get a copy of this message | ||
Hello,
I've made a resource plugin that will allow me to read templates from a
table in a database - nothing special in that. Along with the
template-record I have som other data that I make available to the template
with the assign-method. But when I use the include-function inside my
templates (like {include file="db:/mytpl"} ) I want to be able to assign
variables from the database record of "mytpl", so they are available when
parsing mytpl. So, is it possible, and how, to assign variables to templates
loaded by a smarty_resource_db_source function in a resource plugin ?.
Best regards,
Jan H. Andersen