/priv/skel/blog/resources/resource_default_postcomment.erl

https://code.google.com/p/zotonic/ · Erlang · 13 lines · 7 code · 3 blank · 3 comment · 0 complexity · a710ab14b81cdf1070a0f9fa1c019524 MD5 · raw file

  1. %% @author author <author@example.com>
  2. %% @copyright YYYY author.
  3. %% @doc Example webmachine_resource.
  4. -module(resource_default_postcomment).
  5. -export([event/2]).
  6. -include_lib("zotonic.hrl").
  7. event({submit, postcomment, _TriggerId, _TargetId}, Context) ->
  8. ?DEBUG(z_context:get_q_all(Context)),
  9. {Html, Context1} = z_template:render_to_iolist("_article_comments.tpl",[], Context),
  10. z_render:update("comments", Html, Context1).