function getPage() { $data = array(); // if there is no path, load the index if (empty($this->data['path'])) { $page = new Page(1); } else { $page = new Page(); $page->get_page_from_path($this->data['path']); } // see if we have found a page if ($page->get('id')) { // store the information of the page /* $data['id'] = $this->data['id'] = $page->get('id'); $data['title'] = stripslashes( $page->get('title') ); $data['content'] = stripslashes( $page->get('content') ); $data['tags'] = stripslashes( $page->get('tags') ); $data['date'] = strtotime( stripslashes( $page->get('date') ) ); */ $data = $page->getAll(); // check if the page has been classified as a category $this->category = strpos($data['tags'], "category") > -1 ? true : false; $data['path'] = $this->data['path']; //$data['view'] = getPath('views/main/body.php'); $this->data['body'][] = $data; // FIX #38: copy data of "static" pages in a separate array for easy access $this->data['_page'] = $data; $this->data['template'] = stripslashes($page->get('template')); return true; } else { return false; } }