I have just do in my cms when doing with views from both Modules views only can get in one Path View
Line 218: system\View\View.php
PHP Code:
$this->renderVars['file'] = $this->viewPath . $this->renderVars['view'];
if (! is_file($this->renderVars['file']))
{
$this->renderVars['file'] = $this->loader->locateFile($this->renderVars['view'], 'Views', empty($fileExt) ? 'php' : $fileExt);
}
I thing we need change allow load if is realpath before
PHP Code:
// Add custom load full path -- AnonyX
$this->renderVars['file'] = $this->renderVars['view'];
if (!is_file($this->renderVars['file']))
{
$this->renderVars['file'] = $this->viewPath . $this->renderVars['view'];
}
if (! is_file($this->renderVars['file']))
{
$this->renderVars['file'] = $this->loader->locateFile($this->renderVars['view'], 'Views', empty($fileExt) ? 'php' : $fileExt);
}
So we can load layout or view from other Path view when we set realpath
This is better for coding in Modules
I desire CI have in next version