Wrapper library for managing PHPTAL environment. Also supports HTML Tidy formatting.
use \LSS\Config;
use \LSS\Tpl;
//init templating system
$theme = (Config::get('theme','name') ? Config::get('theme','name') : 'default');
Tpl::_get()->setPath(ROOT_GROUP.'/theme/'.$theme);
Tpl::_get()->setUri('/theme/'.$theme.'/');
Tpl::_get()->set(array(
'lss_version' => LSS_VERSION
,'version' => VERSION
,'site_name' => Config::get('site_name')
,'site_title' => Config::get('site_name')
,'uri' => Config::get('url','uri')
,'url' => Config::get('url','url')
,'theme_path' => Tpl::_get()->uri
,'copyright' => '© '.date('Y').' '.Config::get('site_name')
));
unset($theme);
$params = array();
//parse template and return
$params['html'] = Tpl::_get()->output('client_file_manage',$params,false);
//parse template and output
Tpl::_get()->output('client_file_list',$params);
Returns the singleton (creates it if it doesnt exist)
Sets the path to the template files
Sets the URI that should be used when parsing templates
Adds a CSS file entry that gets output to the HEAD section of the body
Clears the CSS buffer
Adds a Javascript file load that will be output to the HEAD section of the body
Clears the JS buffer
Sets a constant that can be used globally in the templates
Get a constant by name If $name is NULL returns entire constant tree Returns NULL if no constant exists
Add raw data to the template body
Resets the body buffer
Enables stubs that are loaded conditionally
Adds debug output to but printed with the template (allows debug data to be formatted more readible)
Returns buffered debug data ready for templating
Collects various stats from script execution The return value is ready for templating
Output Function
Language | php |
Version | 0.0.0 |
Git URL | https://github.com/nullivex/lib-tpl |
License | GPL-3.0 |
Description | Wrapper library for managing PHPTAL environment. Also supports HTML Tidy formatting. |
Keywords |