News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate's Blog:
Templating with Haml
September 09, 2010 @ 12:51:40

Sameer Borate has posted about an alternative templating system that's currently being used in multiple languages - Haml (HTML Abstraction Markup Language). As Sameer points out, there's also a PHP port of it.

It has been a while since I've used a template engine during development, the last one I used was Smarty. Now there are a plethora of template systems, but most are a rehash of Smarty. Readers may beg to differ, but Smarty gets the work done, which is all that matters. The one that I found really interesting is Haml.

He includes some markup examples of how it's structured - the main structure of the site, tables, divs, etc - and what it comes out like on the other side of the parser. The phphaml and phamlp libraries let you run the template through with variable values set and display it. There are some downsides he mentions, though, like the rules on indentation and that the markup has to be all in one file (or combined before sending to be rendered).

0 comments voice your opinion now!
template haml markup abstraction tutorial phphaml phamlp


blog comments powered by Disqus

Similar Posts

NETTUTS.com: 7AMP - Creating a Development Environment

MaltBlue.com: Zend Form Mastery with Zend Config - Part 1, Custom Filter Paths

BillS' IIS Blog: How to install PHP on IIS7 (RC1)

NetTuts.com: How to Use the Nettuts+ Phing Build Script

PHPMaster.com: Using cURL for Remote Requests


Community Events





Don't see your event here?
Let us know!


refactor unittest release community testing podcast interview framework install code opinion symfony2 threedevsandamaybe list introduction api laravel language developer series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework