I currently use a different layout template for my registration / session view than is what is my app's default layout.
IE: This was how I render my own custom layout when using my own auth lib
render("new.html", layout: {PolymorphicProductionsWeb.LayoutView, "full-header.html"},
from the looks of it there is nothing allowing me customization of which layout to use when calling render from the controller.
Thoughts?
You can use Phoenix.Controller.put_layout/2. In your router.ex you can set it as a pipeline:
pipeline :pow_layout do
plug :put_layout, {PolymorphicProductionsWeb.LayoutView, 鈥渇ull-header.html鈥潁
end
scope "/" do
pipe_through [:browser, :pow_layout]
pow_routes()
end
Awesome, thank you! Thats really cool I had no idea you could do that.
Most helpful comment
You can use
Phoenix.Controller.put_layout/2. In yourrouter.exyou can set it as a pipeline: