This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/controller/templatedefault.php
2011-07-18 16:19:20 +10:00

37 lines
914 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the default template controller for rendering pages.
*
* @package lnApp
* @subpackage Page/Template
* @category Controllers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Controller_TemplateDefault extends Controller_lnApp_TemplateDefault {
protected function _left() {
if ($this->template->left)
return $this->template->left;
elseif (Auth::instance()->logged_in(NULL,get_class($this).'|'.__METHOD__))
return Controller_Tree::js();
}
protected function _right() {
if ($this->template->right)
return $this->template->right;
else
return $this->_cart();
}
private function _cart() {
if (! Cart::instance()->contents()->reset(FALSE)->count_all())
return '';
return Cart::instance()->cart_block();
}
}
?>