Documentation is available at ex5.php
- <?php
- /**
- * example 5
- * demonstrates nullstrings
- *
- * $Id: fsource_XTemplate__ex5.php.html,v 1.3 2005/04/11 10:00:49 cocomp Exp $
- */
- include_once('./xtemplate.class.php');
- $xtpl = new XTemplate('ex5.xtpl');
- $xtpl->assign('INTRO_TEXT', "by default, if some variables weren't assigned a value, they simply disappear from the parsed html:");
- $xtpl->parse('main.form');
- $xtpl->assign('INTRO_TEXT', "ok, now let's assign a nullstring:");
- $xtpl->SetNullString('value not specified!');
- $xtpl->parse('main.form');
- $xtpl->assign('INTRO_TEXT', 'custom nullstring for a specific variable and default nullstring mixed:');
- $xtpl->SetNullString('no value..');
- $xtpl->SetNullString('no email specified!', 'EMAIL');
- $xtpl->parse('main.form');
- $xtpl->assign('INTRO_TEXT', 'custom nullstring for every variable:) .. you should get it by now. :P');
- $xtpl->SetNullString('no email specified', 'EMAIL');
- $xtpl->SetNullString('no name specified', 'FULLNAME');
- $xtpl->SetNullString('no income?', 'INCOME');
- $xtpl->parse('main.form');
- $xtpl->parse('main');
- $xtpl->out('main');
- /*
- $Log: fsource_XTemplate__ex5.php.html,v $
- Revision 1.3 2005/04/11 10:00:49 cocomp
- Added restart() method sf:641407 feature request
- Revision 1.2 2005/04/07 12:02:52 cocomp
- MAJOR UPDATE: E_ALL safe, better internal documentation, code readability ++, many bugfixes and new features - considered stable
- Revision 1.1 2001/07/11 10:49:25 cranx
- *** empty log message ***
- Revision 1.2 2001/03/26 23:25:02 cranx
- added keyword expansion to be more clear
- */
- ?>
Documentation generated on Mon, 11 Apr 2005 10:59:09 +0100 by phpDocumentor 1.3.0RC3