• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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);
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.