isLoggedOn()) { $loggedon = true; $currentUser = $userservice->getCurrentUser(); $currentUserID = $userservice->getCurrentUserId(); } function displayTag($tag, $uId) { $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $output = '{ id:'.rand().', name:\''.$tag.'\''; $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId); if(count($linkedTags) > 0) { $output.= ', children: ['; foreach($linkedTags as $linkedTag) { $output.= displayTag($linkedTag, $uId); } $output.= "]"; } $output.= '},'; return $output; } ?> { label: 'name', identifier: 'id', items: [ ] }