Topic: Show categories in sidebar menu

I use this feature to create a page for each category. Now I want to create a sidebar menu so that only category names shows up in the menu. Then how can i put it is main.tpl? ( I mean something like <pun_navlinks>).

Re: Show categories in sidebar menu

Well, first of all you use the Miniportal mod.
Then, in one of the boxes, put this:
<pun_cats>

In header.php, you put this somewhere:

$result = $db->query("SELECT id, cat_name FROM ".$db->prefix."categories");
$list = '<ul>';
while($row = $db->fetch_assoc($result))
{
$list .= '<li><a href="index.php?cid='.$row['id'].'">'.$row['cat_name'].'</a></li>';
}
$list .= '</ul>';
$tpl_main = str_replace('pun_cats', $list, $tpl_main);

This should do it smile