Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Valentin  >  IDtpl  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: example script (2)
Class: IDtpl
Template engine based on PHP template scripts
Author: By
Last change: fix
Date: 2009-03-17 09:41
Size: 919 bytes
 

Contents

Class file image Download
<?php

require_once('idtpl.class.php');

//second flag as true allows class to store data of all templates
$template = new IDtpl('templates/',true); //<--- here

//Preparation some example data to display
$title'Page title';
$variable256;
$data = array(
    array(
'title'=>'Link one''link'=>'http://google.com/''text'=>'some description...'),
    array(
'title'=>'Link two''link'=>'http://google.com/''text'=>'some description...'),
    array(
'title'=>'Link three''link'=>'http://google.com/''text'=>'some description...'),
    array(
'title'=>'Link four''link'=>'http://google.com/''text'=>'some description...')
);

$template->define('title'$title);
$template->define('links'$data);
$template->define('var'$variable);

$template->template('header.tpl');
$template->template('content.tpl');
$template->template('footer.tpl');
$template->display();

echo 
$template->exectime();
?>