Skip to content

Commit 062dc7d

Browse files
datamwebmichalsn
andauthored
Update system/View/View.php
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
1 parent f698418 commit 062dc7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

system/View/View.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n
202202
$this->renderVars['file'] = $this->viewPath . $this->renderVars['view'];
203203

204204
if (str_contains($this->renderVars['view'], '\\')) {
205-
$this->renderVars['file'] = $this->viewPath . ltrim(str_replace('\\', DIRECTORY_SEPARATOR, $this->renderVars['view']), DIRECTORY_SEPARATOR);
205+
$overrideFolder = $this->config->appOverridesFolder !== ''
206+
? trim($this->config->appOverridesFolder, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR
207+
: '';
208+
$this->renderVars['file'] = $this->viewPath
209+
. $overrideFolder
210+
. ltrim(str_replace('\\', DIRECTORY_SEPARATOR, $this->renderVars['view’]), DIRECTORY_SEPARATOR);
206211
} else {
207212
$this->renderVars['file'] = $this->viewPath . $this->renderVars['view'];
208213
}

0 commit comments

Comments
 (0)