Re: Idle thoughts on dealing with the "multiple compiled template directory issue"
| From: | clayton collie | Date: | Thu, 08 Mar 2001 00:46:16 +0000 |
| Subject: | Re: Idle thoughts on dealing with the "multiple compiled template directory issue" | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-344@lists.php.net to get a copy of this message | ||
Final, Final note (im late for a class anyway)
as an example, if my script is in /users/news/index.tpl , and $compile_dir
is /scripts/compiled then the compiled script name would be, for instance
/scripts/compiled/users_news_index.php or
/scripts/compiled/users_news#index.php ' since # is for
instance valid in windows
if you know what i mean. the underscore is a poor choice since it is
commonly used in filenames, but i used it to show that the path would be
transformed to a literal non path string ....
----- Original Message -----
From: "Monte Ohrt" <monte@ispi.net>
To: "clayton collie" <ccollie@cau.edu>
Cc: <smarty@lists.ispi.net>
Sent: Wednesday, 7. March 2001 19:04
Subject: Re: [smarty] Idle thoughts on dealing with the "multiple compiled
template directory issue"
> I got your point, but you might have missed mine :-)
> If you look in the list archive, you will see this idea:
>
> $template_dir = (array("/path/to/templates1" => "/path1",
> "/path/to/templates2" => "/path2",
> "/path/to/templates3" => "/path3");
>
> So Smarty would alias your template directories to a sub-dir of the
> compiled template directory. Then in your template:
>
> {include file="/path2/index.tpl"}
>
> You can reference them just this way.
>
> you cannot put @ in place of / in the compiled template directory, they
> must be real directories. The compiled version of the templates will be
> calling <?php include("./templates/path2/index.tpl"); ?> so it needs
> real directory names.
>
> clayton collie wrote: