[TYPO3-ect] Your experiences with Smarty

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Mar 9 09:35:14 CET 2007


Steffen Kamper wrote: on 08.03.2007 17:50:

>>>> That sounds cool. One feature I would love to see in one "official ECT"
>>>> approach with Smarty would be a way for a developer to ship default
>>>> Smarty templates, but the smarty class flexible to load templates from a
>>>> custom path on demand. So I would configure:
>>>> (...)

>>> with rpt_smarty this is no problem, because you can change templatePath 
>>> with one line:
>>> $this->smartyconf = array (
>>>    'path.' => array (
>>>     'template_dir' => $this->templatePath,
>>>   ), 'config.' => array (
>>>    'caching' => 0,
>>>    'debugging' => 0
>>>   ));
>>>
>>> These options will be implemented in smartyView as well to show the users 
>>> how to configure and set options to smarty.
>>
>> But that's the PHP part. I think Ernesto wants a standardized TS config 
>> for changing the template path.
>>
>> Masi
> 
> that is no Problem, settings are made e.g. by
> templatePath = EXT:myext/templates
> 
> All settings should be available with TS. Wait for next update ;-)

Please re-read my post. I don't want to change the only one
templatePath, I want to be able to have a SEARCH-path of templates. This
way I can keep using the extension developers templates but be able to
overwrite them with some specific templates I have. Another way of
setting this would be:

  templatePath = fileadmin/myext-templates,EXT:myext/templates

So that smarty should search first in fileadmin/myext-templates and THEN
in EXT:myext/templates. This would be the same I have suggested, but a
bit more flexible, as we can have even larger templatePaths... Then just
pass templatePath through stdWrap and we have a VERY powerful
templatePath choosing mechanism. :)

And speaking of Smarty settings, it would be cool to be able to set any
Smarty setting for a specific plugin through TypoScript:

plugin.tx_myplugin.smarty.debugging = 1

etc.

Cheers,
Ernesto


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