PHPBasePlate Wiki
PHP Framework to simplify development process
Status: Beta
Brought to you by:
itsmestevieg
By default the BluePrint Engine is started in common.php
require_once(LOC_CLASSES."BluePrint.class.php"); //Include BluePrint Template Engine $template=new BluePrint(THEME_PATH); //BluePrint Theme Switcher
The Blueprint template engine can be called as follows
$multiset=array( "PageTitle"=>"Welcome to ComputerM8", "MetaDescription"=>"ComputerM8 - I.T. services, sales, support, remote assistance, web design, web hosting, troubleshooting, networking, custom built computers and more.", "MetaKeywords"=>"Computer Repair, Computer Engineer, Web Design, Web Application Design, Web Developer, PHP, HTML, CSS", "PageAuthor"=>"Steven Graham", "URL_IMAGES"=>URL_IMAGES, "URL_CSS"=>URL_CSS, "BodyContent"=>$content ); $template->multiSet($multiset); echo $page->output();
You can set multiple SuperTagz at once using the multiset function shown above. This uses the array key=>value
format. Each of the SuperTagz specified can then be used in the template (ie ...<head><title>[@PageTitle]</title></head><body>[@BodyContent]</body>
...)
Alternatively you can specify a single tag as follows
$template->set("DATE", date("Y-m-d"));
This could then be called in the template file like this [@date]
BluePrint has the ability to output the contents of theme files or php variables, see the following example.
$myvar="The date is [@DATE] and the PHP version is [@PHP_VERSION]"; $content=$template->output($myvar); echo $content;