A little bit messy here, html files in play require the ending foo.scala.html so if the file ends with .html I append .scala.html to the base name. If you can suggest a cleaner method I'll refactor it.