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