SlimBoard icon indicating copy to clipboard operation
SlimBoard copied to clipboard

How to use smarty?

Open dodyw opened this issue 10 years ago • 1 comments

I see there function bootTwig. If I want to use smarty then should I do the following work?

  • create new function bootSmarty
  • rewrite all view files from twig files to smarty

dodyw avatar Sep 14 '14 15:09 dodyw

Hi Dody,

view initialization occurred in the `app/config/slim.php`` , so you need to replace

this line 'view' => new \Slim\Views\Twig() with this 'view' => new \Slim\Views\Smarty()

the bootTwig method just used for registering twig extension, for setting up smarty in Slim app, please refer to this page https://github.com/codeguy/Slim-Views

regards Ikhsan

ikhsan017 avatar Sep 15 '14 03:09 ikhsan017