SV: [SMARTY] Template-dir problem.
| From: | Paolo Nesti Poggi | Date: | Mon, 03 Mar 2003 10:50:39 +0000 |
| Subject: | SV: [SMARTY] Template-dir problem. | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8342@lists.php.net to get a copy of this message | ||
> -----Oprindelig meddelelse-----
> Fra: Martin Kloss [mailto:martin.kloss@gmx.de]
> Emne: Re: [SMARTY] Template-dir problem.
>
>
> At 11:13 03.03.2003 +0100, you wrote:
> >But when the files are compiled I get the same result from every "site
> >value" I test.
> >I think I've read something about separate compile_dirs. Or can I use a
> >cache_id solve the problem?
>
> Yes, you have to use a cache id to specify the cached page.
> From the docs:
>
> if(!$smarty->is_cached("index.tpl","FrontPage")) {
> $smarty->display("index.tpl","FrontPage");
> }
>
> The second parameter should then be a unique ID, i.e.
> the page name & the language, or theme, or both, or
> even a real ID (number).
>
> Martin.
>
When you use cacheing you need separate Cache id, however you always need to
put compiled templates of different sites in separate compile_dirs to avoid
possible name conflicts.
Paolo