Open webitproff opened 4 months ago
solved by plugin via hook forums.sections.main
It can be usefull. Will make it like in Page module:
$mskin = cot_tplfile(array('forums' ,'sections', Cot::$structure['forums'][$c]['tpl']));
/* === Hook === */
foreach (cot_getextplugins('forums.sections.main') as $pl) {
include $pl;
}
/* ===== */
$t = new XTemplate(cot_tplfile($mskin));
We can create and connect custom templates for the "parent" sections of the forum by adding a small piece of code after the hook in line 170 in the file forums.sections.php .
Here is the code:
$mskin = cot_tplfile(array('forums' ,'sections', Cot::$structure['forums'][$c]['tpl'])); $t = new XTemplate($mskin);
During the experiment, a custom template was connected to obtain information about the template name, as an example of "forums.sections.cotonti.tpl", which can be customized in the same way as it is implemented with lists of pages - "page.list.news.tpl", "page.list.system.tpl", etc.