addBehavior('publicBeforeDocumentV2', function () { $tplset = dcCore::app()->themes->moduleInfo(dcCore::app()->blog->settings->system->theme, 'tplset'); if (!empty($tplset) && is_dir(__DIR__ . '/default-templates/' . $tplset)) { dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), __DIR__ . '/default-templates/' . $tplset); } else { dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), __DIR__ . '/default-templates/' . DC_DEFAULT_TPLSET); } }); // breacrumb addon dcCore::app()->addBehavior('publicBreadcrumb', function ($context, $separator) { if ($context == 'categories') { return __('Categories Page'); } }); // tpl values dcCore::app()->tpl->addValue('CategoryCount', function ($attr) { return 'tpl->getFilters($attr), 'dcCore::app()->ctx->categories->nb_post') . '; ?>'; }); dcCore::app()->tpl->addValue('CategoriesURL', function ($attr) { return 'tpl->getFilters($attr), 'dcCore::app()->blog->url.dcCore::app()->url->getBase("categories")') . '; ?>'; });