PHP Classes

File: example.tpl

Recommend this page to a friend!
  Classes of martin barker  >  Funcational Template Manager  >  example.tpl  >  Download  
File: example.tpl
Role: Auxiliary data
Content type: text/plain
Description: This would be in file location "template/default/"
Class: Funcational Template Manager
Template engine that replaces variables in files
Author: By
Last change: Edited to show the new function support inside a TPL
Date: 13 years ago
Size: 796 bytes


Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Template file</title>

{include file} -- this will include file.tpl from the template path<br />
{%test%} -- will output test for from the passedVars <br />

For Loop <br />
{for i = 1; i < 2; i++, <div>Hello %names.[i]%</div> } -- [i] count will output the counters number dose not need to be i can be anythign as long as matches the for or will not be replaced
Foreach --  the following can use nested arrays E.G {foreach names.last}<br />
{foreach names, hello %[i]%<br /> } -- foreach of array
For more information send a message to info at phpclasses dot org.