<?php
// $Id$
// FILE		::	function.ryus_mainmenu.php
// AUTHOR	::	Ryuji AMANO <ryuji@ryus.co.jp>
// WEB		::	RYUS <http://ryus.co.jp/>
//
require_once XOOPS_ROOT_PATH."/modules/legacy/blocks/legacy_mainmenu.php";

function smarty_function_ryus_mainmenu($params, &$smarty)
     {
         $assign = isset($params['assign']) ? $params['assign'] : 'ryus_mainmenu';
         
          $mainmenu = b_legacy_mainmenu_show();
          foreach($mainmenu["modules"] as $module){
              if (count($module["sublinks"]) > 0 ){
                  $mainmenu["sublinks"] = $module["sublinks"];
              }
          }
         $smarty->assign($assign, $mainmenu);
     }


?>