Phoenix.View.render/3

Parsed documentation:
View on GitHub
Renders a template.

It expects the view module, the template as a string, and a
set of assigns.

Notice this function returns the inner representation of a
template. If you want the encoded template as a result, use
`render_to_iodata/3` instead.

## Examples

    Phoenix.View.render(YourApp.UserView, "index.html", name: "John Doe")
    #=> {:safe, "Hello John Doe"}

## Assigns

Assigns are meant to be user data that will be available in templates.
However, there are keys under assigns that are specially handled by
Phoenix, they are:

  * `:layout` - tells Phoenix to wrap the rendered result in the
    given layout. See next section.

The following assigns are reserved, and cannot be set directly:

  * `@view_module` - The view module being rendered
  * `@view_template` - The `@view_module`'s template being rendered

## Layouts

Templates can be rendered within other templates using the `:layout`
option. `:layout` accepts a tuple of the form
`{LayoutModule, "template.extension"}`.

To render the template within the layout, simply call `render/3`
using the `@view_module` and `@view_template` assign:

    <%= render @view_module, @view_template, assigns %>
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.