Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Integrate h2o template engine with codeigniter

I am having problem to integrate h2o php template engine in codeigniter.

any suggestion will be highly appreciable.

like image 670
Sujeet Avatar asked Nov 14 '22 02:11

Sujeet


1 Answers

What have you tried so far? Loading it as a library? etc; Give us some detail.

You are basically trying to merge one application with another (not in a very pretty way either) in the hopes of just having visual output from h2o instead of CI.

My thought would be forgo the VIEW method in CI if you want to use the template system with h2o. Then you would include in your controller like a library and output using the method as utilized in h2o:

$h2o = new h2o('templates/index.html');
echo $h2o->render(array('name'=>'Peter Jackson'));

you would put your templates folder into your root like so:

/templates

This is just a process that I would follow if I wanted to integrate something into CI that would replace the VIEW.

like image 175
Jakub Avatar answered Dec 23 '22 16:12

Jakub