Welcome Guest, Not a member yet? Register   Sign In
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.
Reply
#14

Sorry, guys. I'm going to change method name from `render()` to `display()`.
This is BC break.
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.
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, 07: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, 04: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 }} 
Reply
#19

According to some feedbacks, I added a few APIs:
https://github.com/kenjis/codeigniter-ss-twig#usage
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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB