TL;DR : How can I have two different sets of templates in two different spots?
I have two sets of users, normal_users and developers. Under the
myApp_web folders there will be folders for
normal users &
developers and inside each will be all the related stuff for each (models, controllers, …).
I have no idea how this works, and how Phoenix knows where to find the files still, but after moving the files everything still works, expect the templates.
But when I try to move the templates the app breaks. I’ve changed this in
myApp_web.ex which fixes it for
normal_users, but not for
use Phoenix.View, root: "lib/myApp_web/customer/templates", namespace: myApp
How can I get make two different locations possible for templates? Putting that
root command twice causes an error.
What about bypassing this
View func. Can’t I just tell the view which template to render directly? I can find any documentation explaining how.
defmodule MyApp.AdminSettingsView do use MyAppWeb, :view # WANT TO GET RID OF THIS end