Re: [SMARTY] include template by smarty variable
| From: | Monte Ohrt | Date: | Wed, 02 Apr 2003 22:18:26 +0000 |
| Subject: | Re: [SMARTY] include template by smarty variable | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9044@lists.php.net to get a copy of this message | ||
is your variable embedded in quotes named $module_template ?
On Thu, 2003-04-03 at 16:02, Sascha Willecke wrote:
> Hi,
>
> i get the folowing error by including an template with an smarty variable:
>
> Warning: Smarty error: unable to read template resource: "modules/i" in
> c:\apache\htdocs\includes\Smarty.class.php on line 999
>
> my source:
> file = index.tpl
> ...some code...
> {if $module_template != ""}
> {include file="modules/$module_template.tpl"}
> {/if}
> ...some code...
>
> file = index.php
> $template->assign("module_template","index_index");
>
> ...some code...
>
> $template->display("index.tpl");
>
> whats wrong?
>
--
Monte Ohrt <monte@ispi.net>