Open nkezhaya opened 8 years ago
can you not change
plug :put_layout, {Addict.AddictView, "addict.html"}
to be a different file?
@joshuaswilcox i was under that impression, too, but it somehow has no effect.
i tried
plug :put_layout, {MyApp.LayoutView, "app.html"}
Hmm, yeah i thought i had that working, but I guess not
I seems that doing that in the controller does nothing because in addict/lib/addict/controller.ex
defp put_addict_layout(conn) do
conn
|> put_layout({Addict.AddictView, "addict.html"})
end
is defined and piped into each route
def login(%{method: "GET"} = conn, _) do
csrf_token = generate_csrf_token
conn
|> put_addict_layout
|> render("login.html", csrf_token: csrf_token)
end
so I guess you need to override the controller to change it
(As opposed to being forced to use addict/addict.html)