diff --git a/src/Controller/Component.php b/src/Controller/Component.php index bb8938f..3672a57 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -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 {