• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter Simple and Secure Twig

#11
Kenjis thank you guy, your pack is amazing and made twig and codeigniter work naturaly. I looking for something like this for a long time. Again, thank you so much.
Reply

#12
Kenjis, how can I get the output without display the content? I want take a template to send email? Sorry if I was clear.
Reply

#13
No problem. But there is no method. I'll add it.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#14
Sorry, guys. I'm going to change method name from `render()` to `display()`.
This is BC break.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#15
I have changed API.
See https://github.com/kenjis/codeigniter-ss-twig#usage

Replace `$this->twig->render` with `$this->twig->display` for existing code.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#16
Kenjis you are the most awesome developer in the world (maybe in the codeigniter twig world), thank you so much. I'll keep the project as it is, but I'll use this method on future project of course.
Reply

#17
(05-24-2015, 08:06 PM)kenjis Wrote: Hi, I built A Simple and Secure Twig integration for CodeIgniter 3.0.

https://github.com/kenjis/codeigniter-ss-twig

This is really simple implementation. Try it, if you like.
How can I use  CI session in Twig template?
Reply

#18
(10-22-2015, 05:19 PM)mukitti Wrote: How can I use  CI session in Twig template?

Session variables are variables. So it can be used in the same way as other variables.

In controller:

PHP Code:
       $this->load->library('session');
 
       $_SESSION['test'] = 'test';
 
       $data['session'] = $_SESSION;
 
       $this->twig->display('welcome/index'$data); 

In twig file:

PHP Code:
{{ session.test }} 
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#19
According to some feedbacks, I added a few APIs:
https://github.com/kenjis/codeigniter-ss-twig#usage
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#20
I've just released v0.1.0: https://github.com/kenjis/codeigniter-ss-twig/releases

Usage: https://github.com/kenjis/codeigniter-ss-twig#usage

Thank you for your guys feedback until now.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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