Login   Register  
PHP Classes
elePHPant
Icontem

File: ex6.p

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of barnabás debreceni  >  XTemplate  >  ex6.p  >  Download  
File: ex6.p
Role: ???
Content type: text/plain
Description: example 6 (demonstrates SetNullBlock)
Class: XTemplate
Template engine for PHP
Author: By
Last change:
Date: 2000-06-09 12:06
Size: 879 bytes
 

Contents

Class file image Download
<?

	/* 
		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");

?>