Idle thoughts on dealing with the "multiple compiled template directory issue"

From: Date: Wed, 07 Mar 2001 22:48:57 +0000
Subject: 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-338@lists.php.net to get a copy of this message
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

« previous php.smarty.general (#338) next »