forked from bcit-ci/CodeIgniter
-
Notifications
You must be signed in to change notification settings - Fork 26
PseudoVariables
World Wide Web Server edited this page Jul 4, 2012
·
4 revisions
Here is a list of Pseudo Variables that you can include in your CodeIgniter Templates:
{elapsed_time} http://codeigniter.com/user_guide/libraries/benchmark.html An alternate way to show your elapsed time in your view files is to use this pseudo-variable, if you prefer not to use the pure PHP.
Are there any more ?
NOTE Pseudo Variables are DO NOT seem to be expanded if you are concatenating Templates !
class Srch extends Controller {
function Srch()
{
parent::Controller();
}
function index()
{
$this->load->library('parser');
$data = array( 'btitle' => 'XXX' , 'bhead' => 'YYY' ) ;
echo $this->parser->parse('head',$data,true);
$data = array( 'btitle' => 'AAA' , 'bhead' => 'BBB' ) ;
echo $this->parser->parse('foot',$data,true);
$this->parser->parse('foot',$data);
// $this->load->view('search');
}
}
XXX YYY AAA BBB Page rendered in {elapsed_time} seconds
AAA BBB Page rendered in 0.1075 seconds