putJsFooter Method

This method will be loaded a theme with javascript content from a theme file.

The $content_location value will be reffered to a file name under app/view/THEME/.

This value also can contain path prefix of subdirectory before the filename.

Content Location Requirements

The valid content should only put inside in a directory beneath current selected theme directory.

|- app
|-- view
|--- front
|---- home
|----- home.php
|----- home_bottom.php

Basic Usage

Here is the basic usage of putJsFooter.

$this->db->putJsFooter(string $content_location[, array $data]): controllerObject

Example

Here is the example for putJsFooter method.

class Home extends SENE_Controller
{
  public function __construct()
  {
    parent::__construct();
    $this->setTheme('homepage');
  }
  public function index()
  {
    $data = array();
    $this->putThemeContent('home/slider',$data);
    $this->putThemeContent('home/three_values',$data);
    $this->putJsFooter('home/home_bottom',$data);
    $this->loadLayout('col-1',$data);
  }
}

So, the col-1 theme, col-1 layout and home_bottom.php content should be existed on the directory structure.

- app/
|-- view/
|--- front/
|---- home/
|----- slider.php
|----- three_values.php
|---- page/
|----- col-1.php

Example home_bottom.php content

Here is the example code for home_bottom.php content

alert('Hi, this is from home_bottom');