How to obtain compiled views ?

One of the methods in my controllers is responsible for sending emails. I wonder what is the best way to store the email templates, then compiled them using handlebars and replace appropriate fields and then send the mails.

1 Reply
  • Hey Akshar, if you need composite execution, then you can use mojito-composite-addon and ac.composite.execute() to collect the html generated by the childrens.

    If you don't need composite, then you can just use mojito-partials-addon and ac.partials.render() to collect an HTML fragment generated from a view at the mojit level. API here: http://developer.yahoo.com/cocktails/mojito/api/classes/Partial.common.html#method_render


Recent Posts

in Yahoo! Mojito