playframework - Custom view directories for Play Framework 2.x not working -


i'm new using play framework (2.2.x) , having tough time figuring out how render views not located in \app\views directory.

my project organized such each section (directory) of app has it's own views, controllers, services, repositories... etc. it's structure i'd keep. looks 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, can see above, in sub-directories in each app section. view locations vary 1 sub-directory deep many more. looks 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 follow default 'play' way of rendering view located in \app\views works fine:

views.html.index.render() 

i'm having tough time adapting default 'play' way recognize views located outside of \app\views directory. i'm sure there's sort of configuration or way of identifying views, can't see in documentation.

how render view not located in \app\views directory?

thanks help.

you don't have much, address correctly.

assume have view in app\common\views\index.scala.html, in controller have refer common.views.html.index. note common.

you can check actual packages of classes generated templates looking target/scala-2.10/src_managed/main/<your-prefixes>/views/html/


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -