- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
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
Parameters
This method has 1 required parameter and 1 optional parameter.
$jsfile_location
The $jsfile_location
value can be string that point to a javascript filename with its location prefix, like URL.
$utype
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.
Example
Here is the example for putJsFooter
method in a controller.
class Home extends SENE_Controller
{
public function __construct()
{
parent::__construct();
$this->setTheme('homepage');
}
public function index()
{
$data = array();
$this->putThemeContent('home/home',$data);
$this->putJsFooter($this->cdn_url('skin/front/js/app.js'), 1);
$this->loadLayout('col-1',$data);
$this->render();
}
}