Login   Register  
PHP Classes
elePHPant
Icontem

File: generator.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sebastien Renauld  >  Template Lite  >  generator.php  >  Download  
File: generator.php
Role: Example script
Content type: text/plain
Description: Generator
Class: Template Lite
Process several blocks from a single template file
Author: By
Last change:
Date: 2006-11-06 01:05
Size: 624 bytes
 

Contents

Class file image Download
<?
// load the template
$template = new templateadm('blog.temp');
// Print the block named head
$template->generate_t("head");
// Print a box inside the template
$template->generate_t("blogbox",array('title' => 'a title''postby' => 'anima''time' => 0'postid' => '1''texte' => 'A little text that will appear in the box'));
// The number of arguments in the array is virtually limitless.
// They do not need to be declared first, nor do they
// have to be in the template. all ^[a-z0-9]% (case insensitive)
// variables in the templates will be replaced, IF there is a similar
// argument in the array.
?>