[TYPO3-ect] Improvement of the template engine

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Jan 27 19:33:02 CET 2006


Kai Laborenz schrieb am 27.01.2006 16:08:

>> 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 undestood you right. More flexibility often means more complexity.
> Thats not always bad - the question is: what do I get and what do I have
> to pay...
> 
> The advantage of the open approach is that everybody can use his
> favourite templating mechanism.

True.

> The drawback is you have some extensions with html templates, some with
> smarty, some with TypoScript and some with some methods yet unknown.
> You get a variety of solutions for one problem. More complexity.

This is how it is already. There are already extensions rendering stuff
in HTML-templates, and others rendering with pure TS, and I'm sure there
are others that might even depend on smarty. This currently depends on
the extension developers taste.

My suggestion would be that the extension coordination team set up a
guideline for extension development. This starts with Kickstarter, of
course, which should output only "beautiful" TYPO3 code. In that
guideline I would expect making some recommendations for rendering the
output:

a) use TS, stdWrap and cObjects
b) create default TS-setup for your plugin which uses the TEMPLATE
cObject (markers/subparts), and provide a slim XHTML-compliant template

There are probably EXT-authors that are not very good at laying out
content, but he could then request help: He provides the data,
pre-processing of the data (stdWraps) and some rendering cObjects and
someone can then create the HTML-templates for them.

Currently there is no guideline at ALL (AFAIK) on how extensions should
render its output. Everybody just copies what works for others (tt_news
for example). This information should be documented and made available
for interested extension developers.

> We don't need three or four ways of templating. We need one way - it
> just to make a decision wich way is the TYPO3 way.

I don't think we will be able to do that, and I don't even think we need
to do that.

> Maybe another approach is to do all the templating in the core (or
> somewhere 'near' the core).

I might be repeating myself: but this is already available and being
used. Its called TypoScript and its content objects.

> Extensions just request certain functional structures (like a table) and
>  get the template markup for this structure delivered.

See CTABLE cObject for rendering data as a "table".

Cheers,
Ernesto



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