RE: [SMARTY] include a file assigned by a php variable?!
| From: | Achim Gosse | Date: | Thu, 23 May 2002 10:09:01 +0000 |
| Subject: | RE: [SMARTY] include a file assigned by a php variable?! | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4381@lists.php.net to get a copy of this message | ||
ups, mailed this mail (only) to Roberto. sorry!
@Roberto:
please have a look at the error message.
include doesn't seem to be the problem.
the replacement of the variable $footer / $header fails (Array?)
the error message when i use the fetch function>
warning: fopen("Array", "r") - no such file or directory...
------------------------------------------------------------------------
@Bertrand:
Could you tell me some version details?
regards.
/achim
> Hello,
>
> There are a custom function called fetch.
>
> {fetch file="footer_1.tmpl"} should work.
>
>
>
> On Thu, 23 May 2002 11:09:57 +0200
> "Achim Gosse" <achim.gosse@ddd.de> wrote:
>
> > hi,
> >
> >
> > i want to use the include function to include different sub
> templates
> > regarding some variables.
> >
> > example:
> >
> > --- basic template ---
> > {include file=$header}
> > some text
> > {include file=$footer}
> > --- basic template ---
> >
> >
> > --- php script ---
> > ...
> > $tmpl->Assign("footer", "footer_1.tmpl");
> > $tmpl->Assign("header",
> > "header_1.tmpl");
> > $tmpl->Display("basic.tmpl");
> > --- php script ---
> >
> > unfortunately this does not work.
> >
> > this error occurs:
> >
> > ...unable to read template resource: "Array" in ...
> >
> >
> > what's wrong here?
> > how can i use "dynamic" sub templates?
> >
> > regdards and thanks in advance.
> >
> > /achim
> >
--