From 282fff8276478fc511c4aa91c331339321036c7c Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Fri, 30 Sep 2022 11:46:52 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=9E=D0=BF=D1=80=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Component.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 {