I'm new to using Play Framework (2.2.x) and I am having a tough time figuring out how to render views not located in the \app\views
directory.
My project is organized such that each section (directory) of the app has it's own views, controllers, services, repositories... etc. It's a structure I'd like to keep. It looks something like this:
\app\Game\Views
\app\Game\Controllers
\app\Game\Services
\app\Game\Repositories
\app\Players\Views
\app\Players\Controllers
\app\Common\Views
\app\Common\Repositories
... etc
Views, as you can see from above, are in sub-directories in each app section. View locations vary from one sub-directory deep to many more. It looks something like this:
\app\Game\Views
\app\Game\Views\sports.scala.html
\app\Game\Views\dates.scala.html
\app\Game\Views\invites.scala.html
\app\Common\Views\Layouts
\app\Common\Views\Layouts\default.scala.html
\app\Common\Views\Partials
\app\Common\Views\Partials\Headers\default.scala.html
\app\Common\Views\Partials\Headers\onboarding.scala.html
... etc
If I follow the default 'Play' way of rendering a view located in \app\views
everything works fine:
views.html.index.render()
I'm having a tough time adapting the default 'Play' way to recognize views located outside of the \app\views
directory. I'm sure there's some sort of configuration or way of identifying those views, but I just can't see it in the documentation.
How do I render a view not located in the \app\views
directory?
Thanks for your help.