cms_build_env['lvl'] || $this->cms_build_env['search_type_asked'] || $this->cms_build_env['input'] == "empr.php" || $this->cms_build_env['input'] == "askmdp.php" || $this->cms_build_env['input'] == "subscribe.php" ){ if(!$this->id){ $this->parameters['selectors'][] = array( 'id' => 0, 'name' => "cms_module_common_selector_lvl" ); } } return parent::get_form(); } public function check_condition(){ global $lvl; global $search_type_asked; $selector = $this->get_selected_selector(); $values = $selector->get_value(); //on regarde si on est sur la bonne page... if($search_type_asked && is_array($values) && in_array($search_type_asked,$values)){ return true; }else if(is_array($values) && in_array($lvl,$values)){ //sur la page if($lvl == "index" || $lvl == ""){ if(!$search_type_asked){ return true; } }else{ return true; } } //on est encore dans la fonction, donc la condition n'est pas vérifiée! return false; } }