function execute()
 {
     $page_url = Request::get('page_url');
     $model = new connectionPagesModel();
     $page = $model->getPageFromUrl($page_url);
     if (!$page) {
         $this->showNotFound();
         return;
     }
     $provider = new PageProviderFenom();
     $this->fenom->addProvider("string", $provider, TEMP_DIR . DS . 'fenom' . DS . 'templates_c');
     $page_content = $model->getLocalePage($page['id'], Language::getActiveLanguageISO());
     $page_content['content'] = $this->fenom->fetch("string:" . $page['id'], array('theme_name' => Settings::getValue('theme')));
     $this->setPageTitle($page_content['title']);
     $this->setPageMeta('keywords', $page_content['meta']['keywords']);
     $this->setPageMeta('description', $page_content['meta']['description']);
     return array('page' => $page_content);
 }
 function execute()
 {
     $result = 'success';
     $model = new connectionPagesModel();
     $page = Request::post('page');
     if (!isset($page['name']) || empty($page['name']) || !isset($page['url']) || empty($page['url'])) {
         return 'error';
     }
     if (!isset($page['id'])) {
         if ($model->getPageFromUrl($page['url'])) {
             return 'error';
         }
         $model->insert($page);
     } else {
         $page_id = (int) $page['id'];
         unset($page['id']);
         $model->where(array('id' => $page_id))->update($page);
     }
     return $result;
 }