The following is a code snippet from the newly generated Phoenix project:
defmodule HelloWeb.PageController do
use HelloWeb, :controller
def home(conn, _params) do
# The home page is often custom made,
# so skip the default app layout.
render(conn, :home, layout: false)
end
end
I’m wondering about how the param layout: false
works. It seems there are some predefined options, so I looked at the documentation for the render function and Plug.Conn, but I didn’t see anything relevant. Where did I go wrong ?