Open Source Billing
This commit is contained in:
35
modules/static_page/classes/controller/staticpage.php
Normal file
35
modules/static_page/classes/controller/staticpage.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides static pages
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Page
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Controller_StaticPage extends Controller_TemplateDefault {
|
||||
/**
|
||||
* By default show a menu of available categories
|
||||
* @todo Only show categories according to their validity dates
|
||||
*/
|
||||
public function action_view() {
|
||||
$id = $this->request->param('id');
|
||||
|
||||
$sp = ORM::factory('staticpage',$id);
|
||||
|
||||
if (! $sp->loaded())
|
||||
Request::current()->redirect('staticpage_category/index');
|
||||
|
||||
Breadcrumb::name($this->request->uri(),$sp->staticpage_translate->find()->title);
|
||||
|
||||
Block::add(array(
|
||||
'title'=>$sp->staticpage_translate->find()->title,
|
||||
'body'=>View::factory($this->viewpath())
|
||||
->set('record',$sp),
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user