-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Bones Template is a bare bones php tempting system based in concepts of Object Oriented Design.
- User Defined Tag Replacement system
- Class based design
- Poly-morphic Template Class support
- Simple to implement Template files
- Template and Site Independent includes
- Template and Site independent Tags
- Sub-template block support via class inheritance
template.tpl
<html><body>[@content]</body></html>page.php
include(config.class.php);
include(bonestemplate.php);
$page = new BonesTemplate('template.tpl');
$page->set("content",file_get_contents('content.html'));
echo $page->output();The Config.class assumes a file called config.php with various site parameters as noted in the file. This config file tells the template engine which template system to use to render the page. From there, the page will take the contents of the desired string stream (such as an html page) and insert it into an array value with the key name of “content.” When output is called, the class will take the template file and replace all instances of [@content] with the string stream associated with “content.”
The developer defines all key values pairs (such as “content”) himself.
Default File Hierarchy
Creating Your Own Templates
Using Site Objects
Using Template Objects
Extending Template Class
FAQ