Welcome Guest, Not a member yet? Register   Sign In
Smarty in CI
#11

[eluser]CodeIgniterNewbie[/eluser]
So, is caching a good enough reason for incorporating Smarty in CI?
#12

[eluser]xwero[/eluser]
It is up to you. If you think some one is going to take over the design somewhere in the future and that person doesn't know how to develop or if you just like the Smarty way of outputting you can add it.
#13

[eluser]CodeIgniterNewbie[/eluser]
Let's just assume all of my designers are also well versed enough in PHP. Is the caching feature enough benefit to invest in Smarty? BTW, what is the "Smarty way of outputting?"
#14

[eluser]xwero[/eluser]
@Sam : that's why i added you can use other libraries like Khaos::KhCache
#15

[eluser]Sam Dark[/eluser]
Well, Khaos::KhCache seems to be really like Smarty's caching.
If your designers are good with php it's better not to use Smarty.
#16

[eluser]xwero[/eluser]
[quote author="CodeIgniterNewbie" date="1208886085"] BTW, what is the "Smarty way of outputting?"[/quote]
If you use Smarty you have to use the methods it provides instead of the CI outputting methods
Code:
// CI
$data['post'] = $formvars;
$data['error'] = $this->error;
$this->load->view('guestbook_form',$data);
// Smarty
$this->smarty->tpl =& new Guestbook_Smarty;
$this->smarty->tpl->assign('post',$formvars);
$this->smarty->tpl->assign('error', $this->error);
$this->smarty->tpl->display('guestbook_form.tpl');
I'm not sure if smarty code is correct but it gives you an idea
#17

[eluser]xwero[/eluser]
@Sam : maybe you can suggest an advanced cache library Wink
#18

[eluser]Sam Dark[/eluser]
The one mentioned previously seems to be good enough.

// I'm using almost the same syntax in my View library.
#19

[eluser]xwero[/eluser]
Here are two more : cache and sparks




Theme © iAndrew 2016 - Forum software by © MyBB