Re: [SMARTY] Too many includes
| From: | messju mohr | Date: | Fri, 04 Jul 2003 09:36:34 +0000 |
| Subject: | Re: [SMARTY] Too many includes | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9836@lists.php.net to get a copy of this message | ||
On Fri, Jul 04, 2003 at 08:18:42AM +0200, Dorthe Luebbert wrote:
[...]
> >- you can write a prefilter the resolves the includes at compile-time
> >before the template is passed to the compiler. some preg_replace-magic
> >should do it. if you have dynamic includes ('{include file=$var}'
>
> what exactly do you mean with "resolving the includes", work with eval? Hm.
no eval. apply a prefilter to your outer template, that searches for
something like '{inline file="[name.tpl]"}' and replaces that by the
real contents of [name.tpl]
maybe see:
http://smarty.php.net/manual/en/advanced.features.prefilters.php
how
to write and load such filters.
HTH
messju