Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class AboutTheOsaController extends ApplicationController{
- function index(){
- $page = Page::get_by_url('about_the_osa');
- $sub_nav = Page::get_child_array($page->id);
- $chips = ChipFactory::get_chips_by_page($page->id);
- $nav_array = Page::make_nav_array();
- $this->Param('nav_array',$nav_array);
- $this->Param('main_url',$page->clean_url);
- $this->Param('sub_nav',$sub_nav);
- $this->Param('nav_array',$nav_array);
- $this->Param('title',ucfirst($page->name));
- $this->Param('heading',$page->heading);
- $this->Param('leader_text',sanitize($page->leader_text));
- $this->Param('content',sanitize($page->body));
- $this->Param('subheading',$page->subheading);
- $this->Param('chips',$chips);
- $this->RenderTemplate();
- }
- function show(){
- $page = Page::get_by_id($this->request->id);
- $sub_nav = Page::get_child_array($page->parent_id);
- $chips = ChipFactory::get_chips_by_page($page->id);
- $parent = page::get_by_id($page->parent_id);
- if ($page->name == 'Board Members')
- $additional_content = BoardMemberFactory::get_all();
- $nav_array = Page::make_nav_array();
- $this->Param('nav_array',$nav_array);
- $this->Param('main_url',$parent->clean_url);
- $this->Param('sub_nav',$sub_nav);
- ;
- $this->Param('nav_on',$page->name);
- $this->Param('title',ucfirst($parent->name).' :: '.ucfirst($page->name));
- $this->Param('heading',$page->heading);
- $this->Param('leader_text',sanitize($page->leader_text));
- $this->Param('content',sanitize($page->body));
- $this->Param('additional_content',$additional_content);
- $this->Param('subheading',$page->subheading);
- $this->Param('chips',$chips);
- $this->RenderTemplate();
- }
- }
- ?>
Add Comment
Please, Sign In to add comment