<?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');
?>
|