Major updates from other projects
This commit is contained in:
@@ -39,8 +39,8 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
protected $ao;
|
||||
|
||||
public function __construct(Request $request, Response $response) {
|
||||
if (Config::theme())
|
||||
$this->template = Config::theme().'/page';
|
||||
if (Site::Theme())
|
||||
$this->template = Site::Theme().'/page';
|
||||
|
||||
return parent::__construct($request,$response);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
|
||||
public function after() {
|
||||
if ($this->auto_render) {
|
||||
$this->template->navbar = $this->template->shownavbar ? View::factory('pages/navbar') : '';
|
||||
$this->template->navbar = $this->template->shownavbar ? View::factory(Site::Theme().'/navbar') : '';
|
||||
|
||||
if (empty($this->template->content))
|
||||
$this->template->content = Block::factory()->render_all();
|
||||
@@ -159,12 +159,6 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
|
||||
if (isset(URL::$method_directory[strtolower($this->request->directory())]))
|
||||
BreadCrumb::name(URL::$method_directory[strtolower($this->request->directory())],$this->request->directory());
|
||||
|
||||
// Application Title
|
||||
if (class_exists('Model_Module') AND $mo=ORM::factory('Module',array('name'=>Request::current()->controller())) AND $mo->loaded())
|
||||
$this->meta->title = sprintf('%s: %s',Kohana::$config->load('config')->appname,$mo->display('name'));
|
||||
else
|
||||
$this->meta->title = Kohana::$config->load('config')->appname;
|
||||
|
||||
// Description
|
||||
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
|
||||
|
||||
|
Reference in New Issue
Block a user