[TYPO3-ect] Improvement of the template engine

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Jan 27 10:44:18 CET 2006


Kai Laborenz schrieb am 26.01.2006 22:01:
> Ernesto Baschny [cron IT] schrieb:
> 
>> The idea of this is to be able to get rid of all "html-templates" as
>> files in the fileadmin area, which are a pain for me to manage (no
>> versioning, etc), which is why I would love to be able to have
>> everything in database.

> Thats you ;-) But I think a lot of not so TS-savy people would like to
> see more html templates.
> 
> I thing a html template is the simplest way of defining the output
> markup. All people who have the knowledge to know what output markup is
> needed are able to define it. If you use TS (or PHP) the need additional
> know how - that makes customizing TYPO3 more complex.

I think you missed the point where I said that this works as well for
HTML-templates but isn't bound to HTML-templates! It doesn't add
complexity, it adds flexibility.

I'm glad that you like working with HTML-templates, and with my approach
you still can. I expect developers of any popular extension to provide
html-template based TypoScript, but the point is: this is not hardcoded
in PHP-code.

And imagine some other guy likes Smarty. If we have some ObTS extension
that provides a SMARTY TS-object, one could even use THAT to generate
any plugins output. A "dream come true" to all those smarty-fans. One
just needs to write the appropriate TypoScript to do that (no need to
extend or change PHP-code). The previous code could look like:

TS for a Smarty-Template:

plugin.my_plugin {
  detailView = SMARTY
  detailView {
    template = FILE
    template.file = EXT:my_ext/res/smarty-template.html
    assign.MARKER1 = TEXT
    assign.MARKER1 {
      field = title
      wrap = <h3>|</h3>
      required = 1
    }
    assign.MARKER2 = TEXT
    assign.MARKER2 {
      field = bodytext
      wrap = <p>|</p>
      required = 1
    }
  }
}


Cheers,
Ernesto



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