fix Определение шаблона
This commit is contained in:
parent
95fc1b28c8
commit
282fff8276
1 changed files with 10 additions and 6 deletions
|
|
@ -247,17 +247,21 @@ class Controller_Component
|
||||||
$template = $component->getTemplateName($registry);
|
$template = $component->getTemplateName($registry);
|
||||||
|
|
||||||
$component->viewPath = array(
|
$component->viewPath = array(
|
||||||
COMPONENTS . '/' . $name . '/',
|
// Сначало ищем локально
|
||||||
|
BASE_PATH . '/templates/' . $template . '/_components/' . $name . '/',
|
||||||
BASE_PATH . '/components/' . $name . '/',
|
BASE_PATH . '/components/' . $name . '/',
|
||||||
|
// Потом в общем хранилище
|
||||||
CMS_PATH . '/../templates/' . $template . '/_components/' . $name . '/',
|
CMS_PATH . '/../templates/' . $template . '/_components/' . $name . '/',
|
||||||
BASE_PATH . '/templates/' . $template . '/_components/' . $name . '/'
|
COMPONENTS . '/' . $name . '/',
|
||||||
);
|
);
|
||||||
if (defined('COMPONENTS_WEB')) {
|
if (defined('COMPONENTS_WEB')) {
|
||||||
$component->webPath = array(
|
$component->webPath = array(
|
||||||
COMPONENTS_WEB . '/' . $name,
|
// Сначало локально
|
||||||
|
SITE_WWW_PATH . '/templates/' . $template . '/_components/' . $name,
|
||||||
SITE_WWW_PATH . '/components/' . $name,
|
SITE_WWW_PATH . '/components/' . $name,
|
||||||
|
// Потом в общем хранилище
|
||||||
TEMPLATE_WEB . '/' . $template . '/_components/' . $name,
|
TEMPLATE_WEB . '/' . $template . '/_components/' . $name,
|
||||||
SITE_WWW_PATH . '/templates/' . $template . '/_components/' . $name
|
COMPONENTS_WEB . '/' . $name,
|
||||||
);
|
);
|
||||||
$component->COMPONENTS_WEB = COMPONENTS_WEB;
|
$component->COMPONENTS_WEB = COMPONENTS_WEB;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue