actions = array('site_map' => 'doSiteMap') + $this->actions; unset($this->actions['list']); $this->Doc_Middle($Page, $DBObj, $options); } function doSiteMap() { $site_map = $this->DBObj->getSiteMap(); $this->Doc->addContent( array( 'tpl' => SiteMap::getPath('CMS/tpl/site_map_light.tpl'), 'siteMap' => $site_map, 'cnt_total' => $this->DBObj->total_pages, ) ); return true; } function _bindFormFields($form) { require_once 'class/DB/Lang/DLang.php'; $DLang = new DLang(); $langList = $DLang->getList(); $form->addElement('hidden', 'id_parent', $this->DBObj->id_parent); $alias = $form->createElement('text', 'alias', 'Alias'); $alias->setValue($this->DBObj->getData('alias')); $form->addElement($alias); $form->addFormRule(array(&$this, 'validAlias')); $form->addRule('alias', 'Alias is requied', 'required'); $form->addRule('alias', 'Alias is requied', 'required', null, 'client'); $form->addRule('alias', 'Invalid Alias', 'alias'); $form->addRule('alias', 'Invalid Alias', 'alias', null, 'client'); if (count($langList) > 1) { $form->addElement('header', 'title_header', 'Page Title'); } foreach ($langList as $lang) { $name = "title[{$lang['name']}]"; if (count($langList) == 1) { $title_error = 'Page Title is required'; $title = 'Page Title'; } else { $title_error = $lang['title'] . ' title is required'; $title = $lang['title']; } $form->addElement('text', $name, $title, array('value' => $this->DBObj->getData($name))); $form->addRule($name, $title_error, 'required'); $form->addRule($name, $title_error, 'required', null, 'client'); } if (count($langList) > 1) { $form->addElement('header', 'menu_header', 'Menu Page Title'); } foreach ($langList as $lang) { $name = "menutitle[{$lang['name']}]"; if (count($langList) == 1) { $title_error = 'Menu Page Title is required'; $title = 'Menu Page Title'; } else { $title_error = $lang['title'] . ' title is required'; $title = $lang['title']; } $form->addElement('text', $name, $title, array('value' => $this->DBObj->getData($name))); $form->addRule($name, $title_error, 'required'); $form->addRule($name, $title_error, 'required', null, 'client'); } if (1 == $this->_options['showSEO_Fields']) { if (count($langList) > 1) { $form->addElement('header', 'keyword_header', 'Keywords'); } foreach ($langList as $lang) { $name = "keyword[{$lang['name']}]"; if (count($langList) == 1) { $title = 'Keywords'; } else { $title = $lang['title']; } $textarea = Form::createElement('textarea', $name, $title, array('rows' => '3', 'style' => 'width:100%;')); $textarea->setValue($this->DBObj->getData($name)); $form->addElement($textarea); } if (count($langList) > 1){ $form->addElement('header', 'description_header', 'Description'); } foreach ($langList as $lang) { $name = "description[{$lang['name']}]"; if (count($langList) == 1) { $title = 'Description'; } else { $title = $lang['title']; } $textarea = Form::createElement('textarea', $name, $title, array('rows' => '3', 'style' => 'width:100%;')); $textarea->setValue($this->DBObj->getData($name)); $form->addElement($textarea); } if (count($langList) > 1){ $form->addElement('header', 'head_header', 'Header'); } foreach ($langList as $lang) { $name = "head[{$lang['name']}]"; if (count($langList) == 1) { $title = 'Header'; } else { $title = $lang['title']; } $textarea = Form::createElement('textarea', $name, $title, array('rows' => '3', 'style' => 'width:100%;')); $textarea->setValue($this->DBObj->getData($name)); $form->addElement($textarea); } } $system =& Form::createElement('advcheckbox', 'system', ' ', 'Don\'t show in sitemap', null, array('n', 'y')); $system->setValue($this->DBObj->getData('system')); $form->addElement($system); $handler =& $form->createElement('select', 'handler', 'Page Type', $this->DBObj->getTypes(), array('id' => 'handler', 'onchange' => 'cms_ChangePageType();')); $handler->setValue($this->DBObj->getData('handler')); $form->addElement($handler); $form->addElement('extended_text', 'redirect_url', 'URL', array('style'=>'width:500px', 'value'=>$this->DBObj->getData('redirect_url')), null, '