Re: Idle thoughts on dealing with the "multiple compiled template directory issue"
| From: | Monte Ohrt | Date: | Wed, 07 Mar 2001 22:56:40 +0000 |
| Subject: | Re: Idle thoughts on dealing with the "multiple compiled template directory issue" | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-340@lists.php.net to get a copy of this message | ||
The compiled templates must be in real directories. they are php scripts
you know, and they include each other.
clayton collie wrote:
>
> as mentioned before in the list, there are folks like myself that for
> various reasons need to have multiple template output/cache directories. a
> thought that just crossed my mind is that you can hack around this
> requirement by making the compiled template names reflect the directory
> heirarchy. let me see if i can explain :
>
> Lets say i have two directories , both with an index.tpl
>
> admin/news/index.tpl (1)
> public/news/index.tpl (2)
> groups/news/index.tpl
>
> when generating the temp files, we can encode the dir structure into the
> name of the generated script, so
> (1) becomes something like admin@news@ab534jhj1kj3.php and
> (2) becomes public@news@ab534jhj1kj3.php
>
> where "@" is a symbol which wond screw with the host OS's file naming
> conventions. of course this requires the compiler to get the directory of
> the script its parsing, but the overhead on that should be neglegible.
>
> clayton
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/