[eluser]xtremer360[/eluser]
I'm using Phil Sturgeon's template library and I'm trying to find out what asset library I should use with his library. Anybody know which works best with it?
Also, I am creating a layout for all my usermanagement forms like my forgot password form, login, register, etc.
This is how it looks so far. When I set this layout in my controller I get an undefined index body error. I'm not quite sure why this is. I have included the file location and controller code.
Login Controller:
Location: ../application/controllers/login.php
Theme Layout:
Location: ../application/themes/foobar/views/layouts/usermanagement.php
Login Form View:
Location: ../application/themes/foobar/views/login.php
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends Backend_Controller
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->template
->title('Login')
->set_layout('usermanagement')
->build('login');
//echo '<pre>';
//var_dump($this->template);
//echo '</pre>';
//die();
}
}
Usermanagement Layout
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" c charset=utf-8" />
<title><?php echo $template['title']; ?></title>
</head>
<body class="usermanagement">
<div class="container-fluid">
<div id="header">
<div class="row-fluid">
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="dashboard.html">
<?php echo lang('global:site_name'); ?>
<span class="slogan">
<?php echo lang('global:site_slogan'); ?>
</span>
</a>
</div><!-- End .container -->
</div><!-- End .navbar-inner -->
</div><!-- End .navbar -->
</div><!-- End .row-fluid -->
</div><!-- End #header -->
</div><!-- End .container-fluid -->
<div class="container-fluid">
<div class="form-container">
<?php echo $template['body']; ?>
</div><!-- End .form-container -->
</div><!-- End .container-fluid -->
</body>