default_template = "

{{title}}

{{resume}}

{{content}}

Sous-rubriques

Articles

"; } public function get_form(){ $form="
"; $form.= $this->get_constructor_link_form("section"); $form.="
"; $form.= $this->get_constructor_link_form("article"); $form.="
"; $form.=parent::get_form(); return $form; } /* * Sauvegarde du formulaire, revient à remplir la propriété parameters et appeler la méthode parente... */ public function save_form(){ // global $cms_module_common_view_section_page_section; // global $cms_module_common_view_section_page_section_var; // global $cms_module_common_view_section_page_article; // global $cms_module_common_view_section_page_article_var; // $this->parameters['links'] = array( // 'section' => array( // 'page' => $cms_module_common_view_section_page_section+0, // 'var' => $cms_module_common_view_section_page_section_var // ), // 'article' => array( // 'page' => $cms_module_common_view_section_page_article+0, // 'var' => $cms_module_common_view_section_page_article_var // ) // ); $this->save_constructor_link_form('section'); $this->save_constructor_link_form('article'); return parent::save_form(); } public function gen_section_select($type,$name=""){ if(!$name) $name = "cms_module_common_view_section_page_".$type; $form = " "; $href = ""; if($this->parameters['links'][$type]['page']){ $href = "./ajax.php?module=cms&elem=".$this->class_name."&categ=module&action=get_env&name=".$this->class_name."_page_".$type."_var"."&pageid=".$this->parameters['links'][$type]['page']."&var=".$this->parameters['links'][$type]['var']; } $form.="
"; return $form; } public function get_page_env_select($pageid,$name,$var=""){ $pageid+=0; $page = new cms_page($pageid); $form="
"; return $form; } public function render($datas){ $datas = $this->add_links($datas); return parent::render($datas); } protected function add_links($data,$type='section'){ global $opac_url_base; $data['link'] = $opac_url_base."?lvl=cmspage&pageid=".$this->parameters['links'][$type]['page']."&".$this->parameters['links'][$type]['var']."=".$data['id']; for ($i=0; $iadd_links($data['children'][$i]); } for ($i=0; $iadd_links($data['articles'][$i],'article'); } return $data; } public function get_format_data_structure(){ $datasource = new cms_module_common_datasource_section(); return $datasource->get_format_data_structure(); } }