ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Integrate Smarty Template Parsing into CodeIgniter

January 30, 2012 9:14pm

Subscribe [9]
  • #16 / Nov 03, 2012 11:05pm

    Jagar

    135 posts

    Thanks again Aken, I have defined the variables and the errors are not coming back

    Regards

  • #17 / Dec 11, 2012 8:42am

    Hendrik Jan

    1 posts

    Hello Aken,

    Thank you for creating this CI-Smarty integration.

    I had to change MY_Loader.php because syntax errors were not showing.
    The end of MY_Loader.php now contains:

    try {
     $output = $CI->smartytpl->fetch($template);
     
     // Return the output if the return value is TRUE.
     if ($return === true) return $output;
     
     // Otherwise append to output just like a view.
     $CI->output->append_output($output);
    } catch(Exception $e) {
     show_error($e->getMessage());
    }

    and now Smarty syntax errors are showing.

    Is this the right way to do this? Can you change it in the git-repository, or should I do a pull-request?

    Kind regards,
    Hendrik

  • #18 / Dec 11, 2012 9:05pm

    Aken

    2430 posts

    I’ll have to look into that. I never ran into Smarty syntax errors, so I’ll check into what kind of errors Smarty throws and how to integrate them into CI. Thanks for the heads up.

  • #19 / Mar 12, 2013 8:40pm

    Aken

    2430 posts

    I’ve updated this script today; details are on the first page of this thread or on Github. 😊

  • #20 / Jun 03, 2013 10:45am

    zafi

    1 posts

    hi, i am trying to close caching but i cant. How can i do that?

  • #21 / Jun 04, 2013 7:42am

    Cristofer John

    1 posts

    I started to play around a bit to integrate the Smarty template engine into the Zend Framework. My ambition was to minimize the required code in the controller actions but stay close to the given Zend_View API. I also wanted to integrate the Smarty caching feature, any suggestions. visit

  • #22 / Jun 18, 2013 4:48pm

    RaZoR LeGaCy

    146 posts

    I am still unsure if it is really better to use smarty. Has anyone made a performance test?

  • #23 / Dec 27, 2013 4:50am

    pakistanihaider

    3 posts

    Thankyou for sharing nice info..

    i worked in codeigniter and i am familiar with it. but its smarty i am working first time..

    problem is that i cant use php in smarty templates, which is fine by me. but i need some method to make codeigniter functions work in templates..

    like i want to see the controller name i would have used $this->router->fetch_class(); with CI views.

    But in .tpl files this command dont work. how to make it work or anyother commands like this ??

    Regards,
    Syed Haider Hassan.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases