Class Template - echiong/testRepo GitHub Wiki
##Class Template
Package: [[application<a href="Package application.libraries.md">libraries]]
Author::
Jun Rama
Date::
13 June 2012, 01:32 PM
Located at application/libraries/template.php
##Methods summary
public __construct ( )
public admin ( string $view, array $params = null )
Loads the header, body and the footer segments of the page.
Parameters
$view
string
$view The view
$params
array
$params The parameters
public display_content ( string $template, array $params = null )
Starts the template engine to handle the View part of the MVC model. Examples to call : $this->template->display_content('login_form',array('header' => false,'footer' => false)); $this->template->display_content('homepage',array('title' => 'This will override the default title located in the _lang file.'));
Parameters
$template
string
$template The path
$params
array
$params The parameters
public boolean _load_header ( )
Displays the header
Returns
boolean
public boolean _load_footer ( )
Displays the footer
Returns
boolean
public boolean set_parameters ( string $param = '', string $value = '' )
Set a parameter to be re-used by the server-side template engine.
Parameters
$param
string
$param The parameter
$value
string
$value The value
Returns
boolean
public boolean set_css_file ( array $param )
Add a CSS file to be automatically loaded in the header.
Parameters
$param
array
$param Contains the needed css files
Returns
boolean
public boolean set_js_file ( array $param )
Add a Javascript file to be automatically loaded in the header.
Parameters
$param
array
$param Contains the needed JavaScript files
Returns
boolean
public load_js ( array $param )
Load batch javascript files. Batches are defined in app.php.
Parameters
$param
array
$param The parameter
public error_404 ( )
Error purposes