With PHP template class you can completely separate your PHP code from your HTML without sacrificing performance or dealing with dozens of additional files to do so.
Features:
- Easy to install
- Lightweight single PHP file (12kb)
- PHP 5 OOP makes it easy to extend
- Caches compiled templates until they’re modified
- Combines css and javascript files into single files
- Compresses css and javascript files using YUI Compressor
- Supports if, elseif, else, and include from within template
- Supports looped data within template
Requirements
- Supports PHP 5 .x or later.
- Ability to execute .jar files via PHP ’s
exec()
function is required for compressing css and javascript files.
Updates
11/04/11 v1.5
- Updated the code in which the cache file’s validity is checked.
10/21/11 v1.4
- Added another optional parameter to the display() function that allows you to combine css and js files into a single file. (Caches combined file until any of the individual files are modified).
// Will combine css and javascript files to 'combined.css' and 'combined.js'
$css = array('global.css', 'style.css');
$template->display('Page Title', 'template-file.html', $css, 'jquery.js', 'combined');
- Added the option to compress css and js files using the YUI Compressor when the above parameter is used. (Falls back to uncompressed version if compression fails).
6/29/11 v1.3
- Added ability to pass css and javascript files through the template class via the display() function by either string or array.
$css = array('global.css', 'style.css');
$template->display('Page Title', 'template-file.html', $css, 'jquery.js');
<!-- EMBED CSS -->
<!-- EMBED JS -->
08/13/10 v1.2
- Cache folder is now created if it doesn’t exist
08/08/10 v1.1
-
Configuration settings can now be passed to class when called:
$config = array('root' => 'template/', 'cache' => 'cache/');
$template = new template($config);
[eltd_button size=”huge-full-width” type=”outline” text=”Download & Demo Links” custom_class=”#” icon_pack=”font_awesome” fa_icon=”” link=”” target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Demo = PHP Template Class
[eltd_button size=”huge” type=”” text=”Full Live Demo” custom_class=”” icon_pack=”font_awesome” fa_icon=”fa-laptop” link=”https://codecanyon.net/item/php-template-class/110173″ target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Kindly Note: We update new contents like WordPress Themes, Plugins, PHP Scripts everyday. But remember that you should never use this items in a commercial website. All the contents posted here for development & testing purpose only. We’re not responsible for any damage, use at your own RISK! We highly recommend to buy PHP Template Class from the The Developer ( ChrisFitz ) website. Thank you.
Download = PHP Template Class-[Updated].zip