#native_company# #native_desc#
#native_cta#

Better alternative to FastTemplates?

By Christopher Brown-Floyd
on October 3, 2001

If you’ve been doing PHP for a while, you probably use templates to separate your HTML from your PHP code. To do this, there are a number of template processor scripts out there that you could use. So far, FastTemplate has been the leading processor. UltraTemplate, on the other hand, employs more powerful tags which makes your scripts smaller and speeds up developement time.

Here’s an example HTML page using UltraTemple:


<html>
<body>
<tag:Content as="b" defaultValue="Hello UltraTemplate user!" />
</body>
</html>

…and the code to process it:


<?php
// Include UltraTemplate class
include("ultratemplate.php");

// Instanciate UltraTemplate class
objTemplate = new UltraTemplate();

// Load the template
objTemplate->load("mytemplate.tpl");

// Bind to template
objTemplate->bind();

// Display template
objTemplate->display();
?>

Using the code above, the HTML page will render as:


<html>
<body>
<b>Hello UltraTemplate user!</b>
</body>
</html>

To learn more or download UltraTemplate go to http://www.ultratemplate.com/