RE: [SMARTY] Dynamic template include
| From: | Mike Carter | Date: | Mon, 10 Mar 2003 14:20:52 +0000 |
| Subject: | RE: [SMARTY] Dynamic template include | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8530@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: John Wards [mailto:j.wards@sportnetwork.net]
>
> On Monday 10 Mar 2003 2:09 pm, Mike Carter wrote:
> > I have a template which gets three variables set. These
> variables are
> > then used to build up a directory path & filename to a sub-template
> > which has to be included.
> >
> > The three variables are: $book, $chapter, $section. I
> tried using the
> > backticks as mentioned in a post in this mailing list archive - no
> > change.
>
> What don't you add the .tpl to the variables in the php code
> rather than the
> smarty code? I know this is not what your are after but it
> might help solve
> the problem.
The variables get used seperatly for other things in the main template too,
so adding '.tpl' in my PHP script before hand would mean stripping it out in
Smarty :-/
Thanks for the suggestion - I had considered that if all else fails. Or
maybe writing my own Smarty modifier.
- Mike
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________