[ Index ] |
|
Code source de SugarCRM 5.0.0beta1 |
1 <? 2 3 /* 4 example 6 5 demonstrates nullblocks 6 7 8 9 */ 10 11 require "xtpl.p"; 12 13 $xtpl=new XTemplate ("ex6.xtpl"); 14 15 $xtpl->assign(INTRO_TEXT,"what happens if we don't parse the subblocks?"); 16 $xtpl->parse("main.block"); 17 18 $xtpl->assign(INTRO_TEXT,"what happens if we parse them? :)"); 19 $xtpl->parse("main.block.subblock1"); 20 $xtpl->parse("main.block.subblock2"); 21 $xtpl->parse("main.block"); 22 23 $xtpl->assign(INTRO_TEXT,"ok.. SetNullBlock(\"block not parsed!\") coming"); 24 $xtpl->SetNullBlock("block not parsed!"); 25 $xtpl->parse("main.block"); 26 27 $xtpl->assign(INTRO_TEXT,"ok.. custom nullblocks.. SetNullBlock(\"subblock1 not parsed!\",\"main.block.subblock1\")"); 28 $xtpl->SetNullBlock("block not parsed!"); 29 $xtpl->SetNullBlock("subblock1 not parsed!","main.block.subblock1"); 30 $xtpl->parse("main.block"); 31 32 $xtpl->parse("main"); 33 $xtpl->out("main"); 34 35 /* 36 37 Revision 1.1 2004/05/27 05:30:47 sugarjacob 38 Moving project to SourceForge. 39 40 Revision 1.1 2004/05/19 01:48:20 sugarcrm 41 Adding files with binary option as appropriate. 42 43 Revision 1.2 2001/03/26 23:25:02 cranx 44 added keyword expansion to be more clear 45 46 */ 47 48 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Sep 11 10:48:47 2007 | par Balluche grâce à PHPXref 0.7 |