|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
abypaul Smarty n00b
Joined: 21 Nov 2015 Posts: 1
|
Posted: Sat Nov 21, 2015 1:33 pm Post subject: Smart3 installed in CodeIgniter3 Call of unknown method view |
|
|
when i am tried to config Smart v3 with CodeIgniter v3 Call of unknown method view Error is occurred.
Instated i use display function its working fine.but i need view method.
//$this->smarty->view('index');
$this->custom_smarty->display('test.tpl');
My all projects are running in view method
Error
==============
Type: SmartyException
Message: Call of unknown method 'view'.
Filename: F:\XAMPP\htdocs\ASoft\Package\new\CodeIgniter303\application\third_party\smarty\libs\sysplugins\smarty_internal_templatebase.php
Line Number: 554
My View Method
==============
/**
* Parse a template using the Smarty engine
*
* This is a convenience method that combines assign() and
* display() into one step.
*
* Values to assign are passed in an associative array of
* name => value pairs.
*
* If the output is to be returned as a string to the caller
* instead of being output, pass true as the third parameter.
*
* @access public
* @param string
* @param array
* @param bool
* @return string
*/
function view($template, $data = array(), $return = FALSE)
{
foreach ($data as $key => $val)
{
$this->assign($key, $val);
}
if ($return == FALSE)
{
$CI =& get_instance();
if (method_exists( $CI->output, 'set_output' ))
{
$CI->output->set_output( $this->fetch($template) );
}
else
{
$CI->output->final_output = $this->fetch($template);
}
return;
}
else
{
return $this->fetch($template);
}
}
}
// END Smarty Class |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|