$templateGroup = ee()->TMPL->getTemplateGroup();
$templateGroup = ee()->TMPL->getTemplateGroup(); if ($templateGroup == 'news') { ee()->TMPL->run_template_engine('news_archive'); } else { ee()->TMPL->run_template_engine('default_archive'); }This code retrieves the name of the current template group and checks if it is equal to 'news'. If it is, it loads the 'news_archive' template group, otherwise it loads the 'default_archive' template group. Package Library: ExpressionEngine - a content management system developed by EllisLab.