news.Resource

Archive:

News-Feeds:


RSS 2.0
RSS 0.91
RDF
ATOM 0.3
Sponsors
hosting by snowflake | PREMIUM OPEN SOURCE
07.05.10 18:00 Age: 2 yrs

Fluid - Next Generation Templating

Category: Community, www.typo3.org

By: ben van 't ende

Fluid is the next generation templating engine, that will be used in TYPO3 Phoenix. It was backported to TYPO3 v4 so everyone can enjoy the advantages of a full templating engine. But what are those advantages?

Susanne Moog has written an article that gives you insight into what Fluid is about and what it is capable of. According to Susanne you get quick results with a minimal amount of fuss. Fluid is for you! The only requirement is that you are willing to learn!

typo3.org/development/articles/fluid-next-generation-templating/


comments

 
Sebastian 08-05-10 08:02  
Hey Susanne,
thanks for this great article!

Greets,
Sebastian

 
François Suter 08-05-10 12:52  
Very nice. I really want to try Fluid outside of the Extbase scope in some projects of mine.

 
Lorenz 09-05-10 23:42  
Great article. I am currently working on an extension that uses Fluid and it has never been easier to have data displayed on a TYPO3 website.

 
Søren Malling 10-05-10 08:19  
Fluid is a great template engine! Both with Extbase and with FLOW3!

Worked with Smarty before, but I found Fluid much easier to work with and really easy to extend with own ViewHelpers

 
Henrik Eriksson 10-05-10 17:25  
Why oh why did you not go the way of Drupal and keep templates pure PHP? Why do I need to learn a cryptic templating language when 99% of all people dealing with Typo3 already are more or less fluent in PHP? Can someone please explain this to me?

 
Dingo 18-05-10 18:01  
I agree with Henrik, TypoScript proved to be powerful and useful, and it was worth learning, but I don't see the real advantages of Fluid, or anything else [besides PHP] that you have to spend another week on to get accustomed to it. And then you'll work on other projects based on different PHP mvc frameworks just to get back to TYPO3 and Fluid in another 2 weeks to notice that you've forgotten everything about Fluid. Please just stick to plain PHP we all love...

 
Goblin 23-08-10 03:50  
Ok, Smarty vs Fluid:
Don't forget this for the Fluid:
$this->objectFactory = t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectFactory');$this->objectFactory->create($viewHelperName);

Properly written Smarty extension will require only
require_once('smarty_engine_class');

1. You still need "$addressObjects = [fetch data];" - no advantages.
2. foreach/if/ifelse/for do exist in Smarty for awhile.
3. What about Smarty's modifiers - there are tons of them, from formatting phone (with/wo extension to typo3 plug-ins), when you can put |format_phone and it will display something like +1 (880) 123-5678 from the just a string value?
4. Fluid foreach? Where's key, first, last? (yeah, maybe Fluid's FOR has it)

And so on, read http://wiki.typo3.org/index.php/Fluid and see how many PHP variable you have to assign before using it.

Add comment