Tiny But Strong (TBS) template engine extension for Yii

I’m used to use TBS (TinyButStrong) template engine for web development.

Now that I’m interested on using Yii for agile web development, I see it does not support TBS. I’ve looked for an extension to support it and didn’t find anything.

So I’ll develop an extension to support it.

Let me know if any of you are interested on using it.

I am curious:

What makes this TBS thing worth looking into?

What makes it different from other templating engines?

If you want to create an extension, do look at the other templating extensions for Yii. :)

What I like about tbs is that the syntax is more clear and elegant than Smarty and since it does not uses curly braces you can easily put vars inside javascript code without the need of the {literal} {/literal} block.

Also to render an array (or a query result) you can use blocks, very easy and simple, no need to use a loop statement in your template. You can also use sub-blocks, a powerful feature.

Something useful are magnets, to create html tags in a condensed way.

Another nice feature is the use of ope in conjunction with max in order to nicely limit the length of the displayed text.

It also has some nice plugins:

by_page and nav_bar: for pagination

cache_system: caching

HTML: select items inside options tags in conjunction with block

OpenTBS: is a PHP tool that easily merges both OpenOffice and Ms Office documents. In fact it can merge any XML or Text file saved in a zip container.

Aggregate: Provides aggregate calulations when a block is merged. It does Sum, Min, Max, Avg, Count, Accumulation and Changes.

Excel: Makes TBS enables to merge Microsoft Excel Worksheets.

(Since this is my first post I’m not allowed to post links… I tailored this reply with url references but too bad I can’t post them…)

Ok I finished creating the extension but I’m not able to post it into the Yii repository, because I’m “too new” to do that.

So I’ll just share it here.

Marco,

Looks like you didn’t post the extension. We are looking for the same thing. To build on top of what you already explained about TBS is that it separates your html code from your php code. It is a nightmare to mix the two. It would make Yii a true mvc if they incorporated it. Model - View - Controller. This would clean up the view side.

Please post your extension if you can.