CoolBrew User Guide Version 1.3
Based on CodeIgniter Version 1.5.4


View Module

This module allows you to load view files from your website documents.

For more information, please see the Views section of the CodeIgniter User Guide.

<?php get('core.view.load', 'view', $vars, $return, $helpers); ?>

Where view is the name of the "view" file to be included, $vars is an associative array of data to be extracted for use in the view, $return is TRUE/FALSE whether to return the data or load it, and $helpers is a list of helpers you want loaded for use in your view file. <?php

require_once 'coolbrew.inc.php';

$hdr['title'] = "My Web Page Title";
$hdr['section'] = 'home';

$helpers = array('form', html');

get("core.view.load", 'header', $hdr, FALSE, $helpers);

?>

<!-- page content goes here -->

<?php get("core.view.load", 'footer', $hdr); ?>

If you don't want to have to remember what helpers need to be loaded with each view file, you can choose to load the required helpers inside your view files. <?php

$this->load->helper(array('form', html'));

?>