[TYPO3-ect] Smarty: Which configuration to set?

Simon Tuck stu at rtpartner.ch
Wed Dec 5 18:57:00 CET 2007


Elmar Hinz wrote:
> Hello smarty fans,
> 
> I want to switch the smarty view of lib from rtp_smarty to smarty.
> 
> I run into an error message about a missing compile directory. By looking
> into the source of smarty you find the solution. Set the compile directory
> in the lib confiruation object to the key:
I don't know why you got an error - Maybe i did a booboo, I'll check the 
ext again. You should be prompted to create a compile and a cache dir in 
typo3temp when you install the extension. I putting it in the temp dir 
seemed to make most sense, you can clear the temp dir from the install 
tool if required, putting it in a subdir of an extension would mean that 
you will export the cache and compile contents when you import/export 
etensions, which is undesirable.
> 
> smarty.compile_dir =  /some/directory/
> 
> Questions:
> 
> 1.) To which value would you recommend to set the directory to?
see above.
> 
> 2.) Could we define a general pattern what directory an extension should
> use?
Don't really see the point.
> 
> 3.) Are there other settings that are important for smarty?
caching is generally off in the context of typo3 otherwise all you need 
to make sure is that template_dir is set.
> 
> 4.) Maybe the smarty experienced users could suggest a smarty lib for the TS
> setyp that can be copied and adjusted by extensions:
> 
> lib.tx_lib.smarty {
>   compile_dir = ... ? ...
>   ... ? ...
> }
Already available with the smarty extension: all the smarty vars can be 
set via TS (it's in the manual), also you can do:

$mySmartyInstance->setSmartyVar('compile_dir','EXT:some/path');

..if you prefer

Cheers,
Simon


More information about the TYPO3-team-extension-coordination mailing list