• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load View is need allow load from realpath before

#1
Question 
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
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.