function catsToJs($ar)
{
-
+ sort($ar);
+ $ret = array(
+ 'xns' => 'Roo.bootstrap',
+ 'xtype' => 'NavGroup',
+ 'items' => array(
+
+ )
+ );
+ foreach($ar as $c) {
+ $ret['items'][] = array(
+ 'xns' => 'Roo.bootstrap',
+ 'xtype' => 'NavItem',
+ 'href' => '#' . str_replace('_','-',strtolower($this->name)). '/'.$c,
+ 'html' => $c
+ );
+ }