Form Main Menu from Categories - Without using Top Menu

Hi All,



I had been working with CS-Cart's tech support but they have now told me its too much to cover under TS! Brilliant… however the code is somewhat working but just needs a little extra 'pizzaz'



In controllers/customer/ init.php I have:



// Added to Allow Top Menu Categories to be displayed as Main Menu
@list($top_menu_categories, ) = fn_get_categories();

//This is the line that needs extra development - I think...
//$top_menu_categories = fn_top_menu_form( fn_get_static_data_section('A', true) );

$top_menu_categories = fn_top_menu_select( $top_menu_categories, $controller, $mode, Registry::get('current_url') );
$view->assign('top_menu_categories', $top_menu_categories);




And then in my_changes I have:



{assign var="foreach_name" value="cats_$cid"}






That runs as expected and produces an unordered list of the top level categories in the site for navigation, however and this is the part where tech support bailed on me - it currently does not highlight the currently viewed page - the cm-active class is missing - {if $category.selected == true }cm-active{/if} .selected does not exist in the returned data because the menu is not being parsed by either



fn_top_menu_form or fn_top_menu_select



I have tried ( see the commented out line in the first code section ) to parse the data through fn_top_menu_form and then fn_top_menu_select but it does nothing or at worst returns no menu items…



Can anyone help with getting this working? Personally I am amazed with Tech Support only offering half an answer and two that this is not an option in the main system!



I look forward to any help resolving this…



MM