本文整理匯總了PHP中XTemplate::SetNullBlock方法的典型用法代碼示例。如果您正苦於以下問題:PHP XTemplate::SetNullBlock方法的具體用法?PHP XTemplate::SetNullBlock怎麽用?PHP XTemplate::SetNullBlock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XTemplate
的用法示例。
在下文中一共展示了XTemplate::SetNullBlock方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: XTemplate
<?php
/*
example 6
demonstrates nullblocks
*/
require "xtpl.p";
$xtpl = new XTemplate("ex6.xtpl");
$xtpl->assign(INTRO_TEXT, "what happens if we don't parse the subblocks?");
$xtpl->parse("main.block");
$xtpl->assign(INTRO_TEXT, "what happens if we parse them? :)");
$xtpl->parse("main.block.subblock1");
$xtpl->parse("main.block.subblock2");
$xtpl->parse("main.block");
$xtpl->assign(INTRO_TEXT, "ok.. SetNullBlock(\"block not parsed!\") coming");
$xtpl->SetNullBlock("block not parsed!");
$xtpl->parse("main.block");
$xtpl->assign(INTRO_TEXT, "ok.. custom nullblocks.. SetNullBlock(\"subblock1 not parsed!\",\"main.block.subblock1\")");
$xtpl->SetNullBlock("block not parsed!");
$xtpl->SetNullBlock("subblock1 not parsed!", "main.block.subblock1");
$xtpl->parse("main.block");
$xtpl->parse("main");
$xtpl->out("main");
/*
Revision 1.1 2004/05/27 05:30:47 sugarjacob
Moving project to SourceForge.
Revision 1.1 2004/05/19 01:48:20 sugarcrm
Adding files with binary option as appropriate.
Revision 1.2 2001/03/26 23:25:02 cranx