[TYPO3-ect] Your experiences with Smarty
Simon Tuck
stu at rtpartner.ch
Mon Apr 7 14:54:38 CEST 2008
Steffen Kamper wrote:
> "Ernesto Baschny [cron IT]" <ernst at cron-it.de> schrieb im Newsbeitrag
> news:mailman.1.1173429315.25504.typo3-team-extension-coordination at lists.netfielders.de...
>> 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
>
> Hi Ernesto,
>
> I understood your request. Maybe my answers were not accurate enough, my
> english is not the best one ...
>
> All will be available from Typoscript:
> - smartyConf
> - templatePath
> - templateFile
>
> so don't worry ;-)
>
> vg Steffen
>
>
These features are already available (and have been for quite a time)
with both rtp_smarty and smarty with the smary ext.
RTFM, please!
for example:
plugin.tx_myplugin.smarty.debugging = 1
plugin.tx_myplugin.smarty.caching = 0
plugin.tx_myplugin.smarty.debug_tpl = EXT:smarty/debug/smarty_debug.tpl
plugin.tx_myplugin.smarty.plugins_dir = EXT:tx_myplugin/more_plugins
plugin.tx_myplugin.smarty.template_dir = EXT:tx_myplugin/templates
Cheers,
Simon
More information about the TYPO3-team-extension-coordination
mailing list