function pagesetter_CatBrowser_rec(&$items, &$i, $indent, $size, &$url_parameters, &$setup)
{
$topcount = smarty_function_pagesetter_CountPubs(array('tid' => $setup['tid'], 'filter' => $filter), &$smarty);
if (isset($setup['listClass']) && $i == 0)
$html = "<div id=\"$setup[listClass]\">
<ul>
<li><a href=\"#\">$setup[field] ($topcount)</a>
<ul>\n";
else
$html = "<ul>\n";
while ($i < $size)
{
$item = $items[$i];
if ($item['indent'] < $indent)
break;
pnModAPILoad('pagesetter', 'admin');
pnModAPILoad('pagesetter', 'user' );
$url_parameters['filter'] = "$setup[field]^sub^$item[id]";
$url_parameters['cv'] = $item['id'] ;
$thisfilter = "$setup[field]:sub:$item[id]";
$filter = smarty_function_pagesetter_createFilter (array('filter' => $thisfilter), &$smarty);
$thiscount = smarty_function_pagesetter_CountPubs(array('tid' => $setup['tid'], 'filter' => $filter), &$smarty);
if($thiscount > 0 || $setup['trim'] == "no")
{
if ($setup['showcount'] != "no")
{
if ($thiscount == 1)
{
$numstr = str_replace("%%NOM%%", $thiscount, $setup[oneform]);
$item[title] = $item[title] . $numstr;
}
elseif (thiscount == 0)
{
$numstr = str_replace("%%NOM%%", $thiscount, $setup[noneform]);
$item[title] = $item[title] . $numstr;
}
else
{
$numstr = str_replace("%%NOM%%", $thiscount, $setup[numform]);
$item[title] = $item[title] . $numstr;
}
}
$url = pnModUrl('pagesetter', 'user', '', $url_parameters);
if ($setup['currentValue'] == $item['id'])
$html .= "<li><span class=\"current\"><a href=\"$url\">$item[title]</a></span>\n";
else
$html .= "<li$className><a href=\"$url\">$item[title]</a>\n";
}
++$i;
if ($items[$i]['indent'] > $indent)
{
$html .= pagesetter_CatBrowser_rec($items, $i, $indent+1, $size, $url_parameters, $setup);
}
$html .= "</li>\n";
}
$html .= "</ul>
</li>
</ul>
</div>\n";
return $html;
}navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
}
navcontainer a
{
display: block;
color: #FFF;
background-color: #036;
width: 9em;
padding: 3px 12px 3px 8px;
text-decoration: none;
border-bottom: 1px solid #fff;
font-weight: bold;
}
navcontainer a:hover
{
background-color: #369;
color: #FFF;
}
navcontainer li li a
{
display: block;
color: #FFF;
background-color: #69C;
width: 9em;
padding: 3px 3px 3px 17px;
text-decoration: none;
border-bottom: 1px solid #fff;
font-weight: normal;
}<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!--[pagesetter_CatBrowser field="CATEGORY1" listClass="navcontainer" showcount="yes" trim="yes"]--> </td>
<td><!--[pagesetter_CatBrowser field="CATEGORY2" listClass="navcontainer" showcount="yes" trim="yes"]--></td>
<td><!--[pagesetter_CatBrowser field="CATEGORY3" listClass="navcontainer" showcount="yes" trim="yes"]--></td>
</tr>
</table>Template courtesy of Designs By Darren.