So after playing around with the search field idea a little longer I realized that I could simply alter the Session depending on a GET flag in the DCA's OnLoad like so:
PHP Code:
// check GET-Flag, change the session to display only allowed items
$arr_SearchNew = $this -> arrObjects['Session'] -> get('search');
if(isset($_GET['t']))
{
$arr_SearchNew['tl_collected_headers']['value'] = ID_ONE;
} else {
$arr_SearchNew['tl_collected_headers']['value'] = ID_TWO;
}
// Set the field name used in the search
$arr_SearchNew['tl_collected_headers']['field'] = 'fieldName';
$this -> arrObjects['Session'] -> set('search', $arr_SearchNew);
As a peculiarity, I had to change the 0 fields in the database to 2, otherwise the search would not be executed.
This way of doing things removes the tree structure of course - It's a hacky solution, what'dya expect?!
Hope that helps anyone with the same problem.
Bookmarks