Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Simple and Secure Twig
#27

(02-21-2016, 11:26 PM)thocutt1020 Wrote: One other question I was wondering about.
With views, you used to be able to store the output in a variable i.e..
 $string = $this->load->view('myfile', '', true);

Can you achieve same result with twig?
 $string = $this->twig->display('myfile.html', '', true);

See https://github.com/kenjis/codeigniter-ss...-templates

You can use `render()` method:
$output = $this->twig->render('welcome', $data);
Reply


Messages In This Thread
CodeIgniter Simple and Secure Twig - by kenjis - 05-24-2015, 07:06 PM
RE: CodeIgniter Simple and Secure Twig - by kenjis - 02-22-2016, 04:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB