I'm using Smarty_parser.php and it w开发者_运维百科orks well when when I use the parser by itself or if I run the parser then a view call. For example:
public function act() {
@$this->load->library('smarty_parser');
$data = array('Someinfo');
$this->smarty_parser->parse('contentTmpls/act.tpl', $data);
// Load Footer
$this->load->view('Templates/footer');
}
but not if I do:
public function act() {
@$this->load->library('smarty_parser');
$this->load->view('Templates/header');
$data = array('Someinfo');
$this->smarty_parser->parse('contentTmpls/act.tpl', $data);
// Load Footer
$this->load->view('Templates/footer');
}
The header view call seems to disappear and does not output anything. I was wondering if anybody has run into this problem or have seen a fix.
I'm not sure if this is kosher but here's the answer. I need to switch out a piece of code: From
if ($return == FALSE)
{
$CI->output->final_output = $template;
}
To this
if ($return == FALSE)
{
$CI->output->append_output($template);
}
Seems to be working fine. Now I just need to see if anybody is maintaining this code to add the patch.
精彩评论