Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of solomongaby  >  LiteTplEngine  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example file
Class: LiteTplEngine
Template engine based on PHP scripts
Author: By
Last change: small upgrade
Date: 6 years ago
Size: 727 bytes
 

Contents

Class file image Download
<?php
include('./common.php'); 

$page = new TplEngine();
$page->assign('page_title''Home');
$page->assign('main_content''_home.php');

// to load css files
$page->loadCSSFile('main.css');

// to load local CSS
$local_css='.a{color:#ff0000;}';
$page->loadCSS($local_css);

// to load JS files
$page->loadJavaScriptFile('main.js');


// to load local JS
$localJS='';
$page->loadJavaScript($localJS);

// to asign a variable
$page->assign('variableName''value');

// to append a variable
$page->assign('leftMenus''Menu Name 1');
$page->assign('leftMenus''Menu Name 2');
$page->assign('leftMenus''Menu Name 3');


require (
UrlRoot.'/common_bottom.php');
$page->display('index.php');
?>