template helpers

By orqi

paths to the project directories

<?=$this->config->resource['img']?>
<?=$this->config->resource['css']?>
<?=$this->config->resource['js']?>

helpers

makelink()
Creates an absolute url to a specified action in the site

<?=$this->MakeLink($controller, $function, $params)?>

<?=$this->MakeLink('signup')?>
=> http://westendvip.com/signup

<?=$this->MakeLink('offer', 'search', 'q=Good Offers')?>
=> http://westendvip.com/offer/search.html?q=Good Offers

PrintMessages()
Prints out all the messages in the session

<?=$this->session->PrintMessages($list_tag='', $list_css='', $item_tag='', $item_css)?>

<?=$this->session->PrintErrors('ul', 'list', 'li', 'item')?>
=> <ul class='list'><li class='item'>Message appears here</li></ul>

LoadComponent
If you have a fragment to load into a page use LoadComponent() – you don’t
need the .php extension

<? $this->LoadComponent($component, $param1, $param2, $param3); ?>

<? $this->LoadComponent('PageFooter'); ?>

Leave a Reply