using smarty template with elgg

Is there anyone who already tried to use Smarty Template Engine with elgg?

  • Views are rendered by a template handler, and this template handler can be set by calling set_template_handler($function_name). When using Smarty, this should be then a call to Smarty. Elgg will pass the view to it.

    I once wanted to try this (for example, to measure any performance win, if any at all) but then I thought this would require huge efforts. I will have to modify all bundled plugins (e.g. blogs, bookmarks, groups, etc.) in order to use Smarty as the view system. On top of that, I wil have to do this also for all community plugins I need to use. Many community plugins don't even follow MVC design pattern strictly. So this is really a BIG task :-)  And, what about upgrading of bundled and community plugins later?


  • Ya, i agree with ElggCloud, but if i want to do something great/different then i must follow some awesome tasks, well thanks for reply.

  • Vishal, we thought about using Smarty. We ended up using Mustache. In the process, we found out we have to rewrite controller system of Elgg. This is a huge task, took us so far approx. 450 hours and is not yet complete (eg. we didn't rewrite core plugins as we don't use them, core is not fully rewritten as well).

    When you overwrite core, there's a large risk you'll have to overwrite it again once new version of Elgg comes out.

    Effects are great though - apart from separation of presentation layer, pages run a lot faster and require much less processing (this is thanks to new caching mechanism and to mustache being generated on browser side).

  • hello all, working with elgg for a span of 3 months i just realised the same need to integrate smarty template engine with elgg,.

    though i soon discovered , its not that easy.. and no other relevent info is provided if we google much,,

    just want to ask the i am using the plugin dev way to put smarty view when activated, is it wise?
    or if there is some other  way,
    plz suggest me a way to put the smarty template as elgg view.

    and thanks elggcloud that info is useful.