When exactly is the database loaded?

#10
[eluser]jwindhorst[/eluser]
Perhaps the reason I wasn't seeing it that way is because I have my own version of the view function in MY_Loader to grab header and footer templates and load numerous views between:
Code:
function view($views, $vars = array(), $return = FALSE)
    {  

        // pass any header vars on to the header    
        $header_vars = (isset($vars['header_data'])) ? $vars['header_data'] : array();

        // pass any footer vars on to the header    
        $footer_vars = (isset($vars['header_data'])) ? $vars['header_data'] : array();

        $doc = $this->_ci_load(array('_ci_view' => 'templates/' . TEMPLATE . '/layout/header', '_ci_vars' => $this->_ci_object_to_array($header_vars), '_ci_return' => $return));

        // if it's an array we need to loop through them
        if(is_array($views))
            foreach($views as $view)
                $doc .= $this->_ci_load(array('_ci_view' => 'templates/' .TEMPLATE . "/".$view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
        else
            $doc .= $this->_ci_load(array('_ci_view' => 'templates/'.TEMPLATE."/".$views, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));

        $doc .= $this->_ci_load(array('_ci_view' => 'templates/'.TEMPLATE.'/layout/footer', '_ci_vars' => $this->_ci_object_to_array($footer_vars), '_ci_return' => $return));
        return $doc;
    }

But I could likely create a work around in there for the css files.


Messages In This Thread
When exactly is the database loaded? - by El Forum - 01-13-2010, 09:56 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 10:06 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 10:44 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 10:51 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 10:56 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 10:58 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 11:08 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 11:10 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 11:29 PM
When exactly is the database loaded? - by El Forum - 01-13-2010, 11:38 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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