putJsContent 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 Controller::putThemeContent.

Controller::putJsContent(string $content_location[, array $data]): ControllerObject


Here is the example for putThemeContent method:

class Home extends SENE_Controller
  public function __construct()
  public function index()
    $data = array();

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

- app
|-- view
|--- homepage
|---- 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');

For further information about home_bottom.php and layout, please refer to Javascript Theme Content.

loadLayout Method putJsContent Method