public function listAction()
 {
     // load contents for page
     try {
         $page = new Knowledgeroot_Page($this->_getParam('id'));
     } catch (Exception $e) {
         // redirect to homepage on error
         $this->_redirect('');
     }
     $contents = Knowledgeroot_Content::getContents($page);
     $files = array();
     // get files for each content
     foreach ($contents as $value) {
         $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));
     }
     // set page for view
     $this->view->id = $page->getId();
     $this->view->title = $page->getName();
     $this->view->subtitle = $page->getSubtitle();
     $this->view->description = $page->getDescription();
     $this->view->contentcollapse = $page->getContentCollapse();
     $this->view->showpagedescription = $page->getShowContentDescription();
     $this->view->showtableofcontent = $page->getShowTableOfContent();
     // set contents for view
     $this->view->contents = $contents;
     // set files for view
     $this->view->files = $files;
 }
 public function selectAction()
 {
     // using blank layout
     $this->_helper->layout->setLayout('blank');
     if ($this->_getParam('id') != null) {
         $this->view->contents = Knowledgeroot_Content::getContents(new Knowledgeroot_Page($this->_getParam('id')));
     }
 }