putJsFooter Method

The putJsFooter method purpose is for loading JavaScript file by add (inject) SCRIPT tag into getJsFooter method from a controller.

Basic Usage

Here is the basic usage for putJsFooter method from SENE_Controller class.

$this->putJsFooter(string $jsfile_location[, int $utype=0]): $this


This method has 1 required parameter and 1 optional parameter.


The $jsfile_location value can be string that point to a javascript filename with its location prefix, like URL.


The $utype value can be an integer, if false or 0 its relative to current BASE_URL. Otherwise, it will point to exact location that provide in the $jsfile_location value.


Here is the example for putJsFooter method in a controller.

class Home extends SENE_Controller
  public function __construct()
  public function index()
    $data = array();
    $this->putJsFooter($this->cdn_url('skin/front/js/app.js'), 1);