[TYPO3-ect] Smarty: Which configuration to set?
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Dec 5 13:00:01 CET 2007
Elmar Hinz wrote: on 05.12.2007 10:09:
> 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:
>
> smarty.compile_dir = /some/directory/
>
> Questions:
>
> 1.) To which value would you recommend to set the directory to?
>
> 2.) Could we define a general pattern what directory an extension should
> use?
>
> 3.) Are there other settings that are important for smarty?
>
> 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 = ... ? ...
> ... ? ...
> }
In my own "smarty-framework" (not really publishing worth...) I allow my
extensions to have templates in typo3conf/ext/<extkey>/templates/ and
compile_dir is automatically set to typo3temp/smarty/<extkey>. This way
each extension doesn't need to care about it, no need to "configure"
anyything and there are no conflicts because each template directory has
its own compile-dir.
So I prefer to have everything done auto-magically than even allowing
stuff like that to be configurable. I see no benefit in it. The
framework also support "search paths" for template files, so that the
extension delivers a set of standard templates which can be overwritten
by just placing files in a certain directory (not configurable, just
following a strict naming convention!).
I cannot think of other "important" settings for smarty. Maybe allowing
the plugins-dir (whcih is an array in Smarty) to be expanded by other
extensions is something interesting, so that extensions could add
"plugins" to the default Smarty installation. I haven't checked the
current state of rtp_smarty, maybe something like this is possible already.
Cheers,
Ernesto
More information about the TYPO3-team-extension-coordination
mailing list