get('DatabaseDriver');
$catId = 22;
// --- 1. FETCH THE TEAM MEMBERS ---
$query = $db->getQuery(true);
$query->select([
$db->quoteName('C.title', 'title'),
$db->quoteName('C.alias', 'alias'),
$db->quoteName('C.introtext', 'intro'),
$db->quoteName('C.images', 'image'),
$db->quoteName('C.urls', 'url'),
'GROUP_CONCAT(m.tag_id) AS tag_ids'
])
->from($db->quoteName('#__content', 'C'))
->join(
'LEFT',
$db->quoteName('#__contentitem_tag_map', 'm'),
$db->quoteName('m.content_item_id') . ' = ' . $db->quoteName('C.id') . ' AND ' . $db->quoteName('m.type_alias') . ' = ' . $db->quote('com_content.article')
)
->where($db->quoteName('C.catid') . ' = ' . (int)$catId)
->where($db->quoteName('C.state') . ' = 1')
->group($db->quoteName('C.id'))
->order($db->quoteName('C.title'));
try {
$db->setQuery($query);
$options = $db->loadObjectList();
} catch (RuntimeException $e) {
echo "
Error: " . $e->getMessage();
$options = [];
}
$total = count((array)$options);
// --- 2. PARENT TAG CONFIGURATION ---
$practiceParentId = 285; // Change this to your real Practices Tag ID
$countryParentId = 286; // Change this to your real Countries Tag ID
$titleParentId = 294; // <--- ADD your new Job Titles Parent Tag ID here
// Reusable function to fetch child tags based on parent
function getLayeredTags($db, $catId, $parentId) {
$query = $db->getQuery(true);
$query->select(['DISTINCT t.id', 't.title'])
->from($db->quoteName('#__tags', 't'))
->join('INNER', $db->quoteName('#__contentitem_tag_map', 'm'), $db->quoteName('m.tag_id') . ' = ' . $db->quoteName('t.id'))
->join('INNER', $db->quoteName('#__content', 'a'), $db->quoteName('m.content_item_id') . ' = ' . $db->quoteName('a.id'))
->where($db->quoteName('a.catid') . ' = ' . (int)$catId)
->where($db->quoteName('m.type_alias') . ' = ' . $db->quote('com_content.article'))
->where($db->quoteName('t.published') . ' = 1')
->where($db->quoteName('a.state') . ' = 1')
->where($db->quoteName('t.parent_id') . ' = ' . (int)$parentId)
->order($db->quoteName('t.title') . ' ASC');
try {
$db->setQuery($query);
return $db->loadObjectList();
} catch (RuntimeException $e) {
return [];
}
}
$practiceTags = getLayeredTags($db, $catId, $practiceParentId);
$countryTags = getLayeredTags($db, $catId, $countryParentId);
$titleTags = getLayeredTags($db, $catId, $titleParentId); // <--- FETCH Titles
?>
Get to know
Our Team
A diverse and international multicultural team that originates from EMEA and beyond. We cover 10 languages.
Please Click on a Tag to Filter the desired View
Search by Name:
Practice / Speciality:
Country / Region:
Role / Seniority:
image);
$urlObj = json_decode($employee->url);
$image_intro = $imgObj->image_intro ?? 'path/to/default.jpg';
$linkedin_url = $urlObj->urla ?? '#';
$tags = $employee->tag_ids ?? '';
// Alternate left/right alignment blocks exactly like your original layout
$alignmentClass = ($counter % 2 == 0) ? 'left' : 'right';
?>