In the Elixir IRC, josevalim
refers to a way to compose templates in Phoenix, by defining and then using a layout helper, as such:
<%= with_layout Layout, "app..." do %>hello<% end %>
I'm very new to Phoenix, but I'm assuming the with_layout
helper is defined in the view corresponding to the template above, but I can't figure out where/how to define and/or access this Layout
. I'm familiar now with "templates" and "views", but can't find much info on Phoenix layouts or layout helpers.
So my question is, what exactly does Layout
refer to here, and how do Phoenix "layouts" differ from "templates"?