/** * Parses one sidebox menu and add's the html to $this->sidebox_content for later use by $this->navbar * * @param string $appname * @param string $menu_title * @param array $file */ function sidebox($appname, $menu_title, $file) { if ((!$appname || $appname == $GLOBALS['egw_info']['flags']['currentapp'] && $file) && is_object($this->tpl)) { $this->tpl->set_var('lang_title', $menu_title); $this->sidebox_content .= $this->tpl->fp('out', 'extra_blocks_header'); foreach ($file as $text => $url) { $this->sidebox_content .= $this->_sidebox_menu_item($url, $text); } $this->sidebox_content .= $this->tpl->parse('out', 'extra_blocks_footer'); } }
function gencat($catid) { $t = new Template(PHPGW_INCLUDE_ROOT . '/bookmarks/templates/export'); $t->set_file('categ', 'export_' . $this->type . '_catlist.tpl'); $t->set_block('categ', 'subcatlist', 'subcats'); $t->set_block('categ', 'urllist', 'urls'); $subcats = $this->categories->return_array('subs', 0, False, '', 'cat_name', '', True, $catid); if ($subcats) { foreach ($subcats as $subcat) { $t->set_var('subcat', $this->gencat($subcat['id'])); $t->fp('subcats', 'subcatlist', True); } } $t->set_var(array('catname' => $this->translation->convert($GLOBALS['phpgw']->strip_html($this->categories->id2name($catid)), $this->charset, 'utf-8'), 'catid' => $catid, 'folded' => in_array($catid, $this->expanded) ? 'no' : 'yes')); $bm_list = $this->_list($catid, False, False, False); while (list($bm_id, $bookmark) = @each($bm_list)) { $t->set_var(array('url' => $bookmark['url'], 'name' => $this->translation->convert($bookmark['name'], $this->charset, 'utf-8'), 'desc' => $this->translation->convert($bookmark['desc'], $this->charset, 'utf-8'))); $t->fp('urls', 'urllist', True); } return $t->fp('out', 'categ'); }