From: Jean-Marc Coic Date: Thu, 20 Jan 2005 22:03:49 +0000 (+0000) Subject: added function to display resume of categories X-Git-Tag: xorg/old~367 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=40fd8ff9c89440aefa0836e699f1a9fd6f9b4d7c;p=platal.git added function to display resume of categories git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-391 --- diff --git a/include/exalead/exalead.smarty.inc.php b/include/exalead/exalead.smarty.inc.php index 722da1e..6eb70b9 100644 --- a/include/exalead/exalead.smarty.inc.php +++ b/include/exalead/exalead.smarty.inc.php @@ -127,9 +127,69 @@ function _exa_navigation_droite($params, &$smarty){ return $res; } +/** +* This function is used to resume database content for given group (template argument 'groupe') +*/ +function _display_resume_groupe($params, &$smarty){ + if(!empty($params['exalead_data'])){ + $exalead_data = &$GLOBALS[$params['exalead_data']]; + } + else{ + $exalead_data = &$GLOBALS['exalead_data']; + } + if(empty($params['groupe'])){ + return ''; + } + $groupe = $params['groupe']; + foreach($exalead_data->groups as $group){ + if($group->title == $groupe){ + $array = & $group->categories; + $result = "
$groupe
"; + return $result; + } + } +} function register_smarty_exalead(&$page){ $page->register_function('exa_display_groupes', '_display_groupes'); + $page->register_function('exa_display_resume_groupe', '_display_resume_groupe'); $page->register_function('exa_display_keywords', '_display_keywords'); $page->register_function('exa_navigation_gauche', '_exa_navigation_gauche'); $page->register_function('exa_navigation_droite', '_exa_navigation_droite');