Hi derakex
I'm no expert but what is your sql query?
Would this do the trick? (using Select Dynamic, in "Query: FREE" ) you need to add the variable ie the usergroup id...
SELECT DISTINCT ART.title AS text, ART.id AS value
FROM #__content ART
INNER JOIN #__user_usergroup_map UGMAP
ON ART.created_by = UGMAP.user_id
INNER JOIN #__usergroups UG
ON UGMAP.group_id = UG.id // replace UG.id with the Usergroup value, if it was id of user, then 'ON UGMAP.group_id = $user->id'.
How you add the Usergroup Value dynamically is the next trick.
In the Seb_one template I pulled the Usergroup(s) that the current user is in:
<?php $thisUser = JFactory::getUser();
$myUserGrps = $myUser->get('groups');
foreach($myUsrGrps as $myusrgrp) {
echo $myusrgrp;
}
?>
but then I get ran out of time...
This post (get-id-of-current-user-on-free-sql-on-slect-dynamic-cascade) sheds some light.
Klas's first repky works ie $user->id, not #$user->id, but the trick is getting the group values, and as there may be more than, adding them all to the query.
Alternatively: A SEBLOD plugin LIKE Search Join etc maybe....
Hope you can work it out then post results :)
Cheers
Bucklash