...

World Wide Web Server 2012-07-04 16:04:55 -07:00
parent 9d6487fa48
commit 8418cb455f

@ -12,7 +12,7 @@ You can add a master template from which you can load View Objects as partials o
* Allows a plugin or module to render a partial.
*
*
* Version 3.0.5 Wiredesignz (c) 2008-08-16
* Version 3.0.6 Wiredesignz (c) 2008-08-19
**/
class View
{
@ -35,10 +35,6 @@ class View
public function load($view, $file = NULL, $data = NULL) /* add a partial & data */
{
if (is_object($view))
return ($this->partials = $view);
if ( ! isset($this->partials[$view]))
$this->partials[$view] = (is_object($file)) ? $file : new View($file);
@ -75,10 +71,12 @@ class View
public function render($render = FALSE) /* render the view */
{
self::$ci->load->vars($this->vars);
if ($this->layout)
{
self::$ci->load->vars($this->partials);
return self::$ci->load->view($this->layout, $this->vars, $render);
return self::$ci->load->view($this->layout, NULL, $render);
}
else
{