in your index function $content[‘nm’] = array( ‘no_cat’ => False, // allows the cat selection in your index
…
if ((int)$query['cat_id'])
{
$query['col_filter'][] = $this->bo->so->_cat_filter($query['cat_id']);
unset($query['cat_id']);
}
where
_cat_filter($query[‘cat_id’]); =
function _cat_filter($cat_id,$cat_col_name='mat_cat_id')
{
if (!is_object($GLOBALS['egw']->categories))
{
$GLOBALS['egw']->categories = CreateObject('phpgwapi.categories');
}
foreach($GLOBALS['egw']->categories->return_all_children((int)$cat_id) as $cat)
{//print_r($cat_id);die();
$cat_filter[] = $this->db->concat("','",$cat_col_name,"','")." LIKE '%,$cat,%'";
}
return '('.implode(' OR ',$cat_filter).')';
}