Menu

BluePrint

BluePrint Template Engine

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;

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.