![]() HTML_Progress2 : The Definitive Guide
|
If you already use HTML_QuickForm you certainly know that the QF default renderer has limited possibilities. But of course HTML_QuickForm provides other renderers that can be used with template engines such as Smarty, Sigma, ... And of course HTML_Progress2_Generator has two interfaces (SmartyDynamic, ITDynamic) to use these QF renderers.
Don't forget that you can also use the PEAR HTML_Page2 package and since the version 2.1.0 the new Tableless QF renderer (PEAR package HTML_QuickForm_Renderer_Tableless).
In this example, we will see how it's so easy to include an instance of HTML_Progress2_Generator in a user page (with header and menus, body, footer); see screenshot below. We will use Sigma, but there is no much more difficulty to implement Smarty, or any other template engine.
Color, font, size and position are defined by default in stylesheet itdynamic.css you can find into PEAR HTML_Progress2 data directory.
Essantial difference with previous examples is to include the right driver (ITDynamic).
<?php require_once 'HTML/Progress2/Generator.php'; require_once 'HTML/Progress2/Generator/ITDynamic.php';session_start(); $tabbed =& HTML_Progress2_Generator::singleton(); $tabbed->run(); ?>
HTML_Progress2 : The Definitive Guide | v 2.1.0 : August 12, 2006 |