fix Определение шаблона

This commit is contained in:
origami11@yandex.ru 2022-09-30 11:46:52 +03:00
parent 95fc1b28c8
commit 282fff8276

View file

@ -247,17 +247,21 @@ class Controller_Component
$template = $component->getTemplateName($registry);
$component->viewPath = array(
COMPONENTS . '/' . $name . '/',
// Сначало ищем локально
BASE_PATH . '/templates/' . $template . '/_components/' . $name . '/',
BASE_PATH . '/components/' . $name . '/',
CMS_PATH . '/../templates/' . $template . '/_components/' . $name . '/',
BASE_PATH . '/templates/' . $template . '/_components/' . $name . '/'
// Потом в общем хранилище
CMS_PATH . '/../templates/' . $template . '/_components/' . $name . '/',
COMPONENTS . '/' . $name . '/',
);
if (defined('COMPONENTS_WEB')) {
$component->webPath = array(
COMPONENTS_WEB . '/' . $name,
// Сначало локально
SITE_WWW_PATH . '/templates/' . $template . '/_components/' . $name,
SITE_WWW_PATH . '/components/' . $name,
TEMPLATE_WEB . '/' . $template . '/_components/' . $name,
SITE_WWW_PATH . '/templates/' . $template . '/_components/' . $name
// Потом в общем хранилище
TEMPLATE_WEB . '/' . $template . '/_components/' . $name,
COMPONENTS_WEB . '/' . $name,
);
$component->COMPONENTS_WEB = COMPONENTS_WEB;
} else {