View Source Pow.Phoenix.Template (Pow v1.0.38)

Module that can builds templates for Phoenix using EEx with Phoenix.HTML.Engine.

Example

defmodule MyApp.ResourceTemplate do
  use Pow.Phoenix.Template

  template :new, :html, "<%= content_tag(:span, "Template") %>"
end

MyApp.ResourceTemplate.new(assigns)

Summary

Functions

Generates HTML template functions.

Functions

Link to this macro

template(action, atom, content)

View Source (macro)
@spec template(atom(), atom(), binary() | {atom(), any()}) :: Macro.t()

Generates HTML template functions.

This macro that will compile a phoenix template from the provided binary, and add the compiled version to a :action/2 function. The html/1 function outputs the binary.