![]() |
Integrate Codeigniter 4.0.2 vs Smarty 3.1.34 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Integrate Codeigniter 4.0.2 vs Smarty 3.1.34 (/showthread.php?tid=76323) |
Integrate Codeigniter 4.0.2 vs Smarty 3.1.34 - aliasgharbabaeian - 05-03-2020 Hey guys I'm gonna start my project with CodeIgniter and i need your help to integrate CodeIgniter 4.0.2 vs Smarty 3.1.34 I appreciate your help... ![]() RE: Integrate Codeigniter 4.0.2 vs Smarty 3.1.34 - aliasgharbabaeian - 07-10-2020 i fount this tutorial, but it's cofusing Translated Link RE: Integrate Codeigniter 4.0.2 vs Smarty 3.1.34 - aybarsm - 07-14-2020 Well, this is what I have done to use Smarty according to tutorials. Downloaded the Smarty to app/ThirdParty/Smarty and created following folders: writable/smarty/templates_c and writable/smarty/cache app/Libraries/CI4Smarty.php: Code: namespace App\Libraries; app/Config/Services.php: Code: namespace Config; Controller to return function: Code: return service('SmartyEngine')->view('smarty_template.tpl'); This approach (service) avoids to load Smarty every time when your app runs. You can call service('SmartyEngine') in your controller whenever you need to run it. |