Guest User

Untitled

a guest
May 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. <?php
  2. class AboutTheOsaController extends ApplicationController{
  3.  
  4. function index(){
  5. $page = Page::get_by_url('about_the_osa');
  6. $sub_nav = Page::get_child_array($page->id);
  7. $chips = ChipFactory::get_chips_by_page($page->id);
  8. $nav_array = Page::make_nav_array();
  9. $this->Param('nav_array',$nav_array);
  10.  
  11. $this->Param('main_url',$page->clean_url);
  12. $this->Param('sub_nav',$sub_nav);
  13. $this->Param('nav_array',$nav_array);
  14. $this->Param('title',ucfirst($page->name));
  15. $this->Param('heading',$page->heading);
  16. $this->Param('leader_text',sanitize($page->leader_text));
  17. $this->Param('content',sanitize($page->body));
  18. $this->Param('subheading',$page->subheading);
  19. $this->Param('chips',$chips);
  20.  
  21. $this->RenderTemplate();
  22. }
  23. function show(){
  24.  
  25. $page = Page::get_by_id($this->request->id);
  26. $sub_nav = Page::get_child_array($page->parent_id);
  27. $chips = ChipFactory::get_chips_by_page($page->id);
  28. $parent = page::get_by_id($page->parent_id);
  29. if ($page->name == 'Board Members')
  30. $additional_content = BoardMemberFactory::get_all();
  31.  
  32.  
  33. $nav_array = Page::make_nav_array();
  34. $this->Param('nav_array',$nav_array);
  35.  
  36.  
  37. $this->Param('main_url',$parent->clean_url);
  38. $this->Param('sub_nav',$sub_nav);
  39. ;
  40. $this->Param('nav_on',$page->name);
  41. $this->Param('title',ucfirst($parent->name).' :: '.ucfirst($page->name));
  42. $this->Param('heading',$page->heading);
  43. $this->Param('leader_text',sanitize($page->leader_text));
  44. $this->Param('content',sanitize($page->body));
  45. $this->Param('additional_content',$additional_content);
  46. $this->Param('subheading',$page->subheading);
  47. $this->Param('chips',$chips);
  48.  
  49. $this->RenderTemplate();
  50. }
  51.  
  52.  
  53.  
  54.  
  55. }
  56. ?>
Add Comment
Please, Sign In to add comment