[eluser]Unknown[/eluser]
Hello everyone,
I'm looking into CI the first time and would like to get advice regarding the following:
Code:
class Journal extends Controller {
function index()
{
$this->load->library('parser');
$data['title'] ='Journal';
$this->parser->parse('header', $data, false);
$this->parser->parse('body', $data,false);
}
}
This does not work. Output is the body-view only. It seems the body-view overrides the header-view.
Code:
class Journal extends Controller {
function index()
{
$this->load->library('parser');
$data['title'] ='Journal';
echo $this->parser->parse('header', $data, true);
echo $this->parser->parse('body', $data,true);
}
This works! Is that the usual way to handle parser output or is there a better idiom?
Thanks in advance
Peter