/** * initialize wbList, so we don't need to do this more than once * * @access public * @return object **/ public static function init_list() { if (!is_object(self::$list)) { self::$list = \wblib\wbList::getInstance(array('__id_key' => 'page_id', '__title_key' => 'menu_title', 'create_level_css' => 'false')); } return self::$list; }
CAT_Helper_SEO::updateSitemap(); } // get current settings $page = CAT_Helper_Page::getPage($page_id); $data = isset($page['settings']) && isset($page['settings']['seo']) ? $page['settings']['seo'] : array(); $fdata = array(); $robots = array(); foreach ($data as $key => $value) { if ($key == 'robots') { $fdata['robots'] = explode(',', $value[0]); } else { $fdata[$key] = $value[0]; } } $form->setData($fdata); $form->setData($page); $form->getElement('page_id_hidden')->setVal($page_id); $tpl_data['details_form'] = $form->getForm(); $check = array(); if (strlen($page['page_title']) < $title_min_length || strlen($page['page_title']) > $title_max_length) { $check[] = $backend->lang()->translate('The title should be a nice "human readable" text having 30 up to 55 characters.') . ' (' . $backend->lang()->translate('current') . ': ' . strlen($page['page_title']) . ')'; } if (strlen($page['description']) < $descr_min_length || strlen($page['description']) > $descr_max_length) { $check[] = $backend->lang()->translate('The description should be a nice "human readable" text having 70 up to 156 characters.') . ' (' . $backend->lang()->translate('current') . ': ' . strlen($page['description']) . ')'; } $tpl_data['check'] = $check; } $pages = CAT_Helper_Page::getPages(1); $tpl_data['page_select'] = \wblib\wbList::getInstance(array('__id_key' => 'page_id', '__title_key' => 'menu_title'))->buildSelect($pages, array('space' => '|--', 'name' => 'page_id', 'selected' => $page_id)); $parser->setPath(dirname(__FILE__) . '/templates/default'); $parser->output('tool', $tpl_data);