PHP Classes

File: ex1.xtpl

Recommend this page to a friend!
  Classes of barnabás debreceni  >  XTemplate  >  ex1.xtpl  >  Download  
File: ex1.xtpl
Role: ???
Content type: text/plain
Description: template file for ex1.p
Class: XTemplate
Template engine for PHP
Author: By
Last change:
Date: 17 years ago
Size: 1,136 bytes


Class file image Download
<!-- BEGIN: main -->
<head><title>example 1</title></head>
this is a simple replace test. the text in bold should contain "TEST": <b>{VARIABLE}</b><br>
now a dynamic block test:<br>
	<!-- BEGIN: block1 -->
	this is block 1.<br>
	<!-- END: block1 -->
	<!-- BEGIN: block2 -->
	this is block 2.<br>
	<!-- END: block2 -->

	<!-- BEGIN: block3 -->
	<p><table border=1>
	<!-- END: block3 -->

global variables can be parsed directly into the html without assigns:<br>
(<font color=red>note</font> that these variables are scanned in the constructor when creating the XTemplate object!
so if you need some variables which you have set after creating the template object, you need to call <b>$xtpl->scan_globals()</b>
before parsing the actual block!
<!-- END: main -->