title: Play framework dynamic template include
body: <p>I have a template that has to include another template based on the file name that comes from the database. For example, here is a template that takes a String that contains the name of the template file that will be included in another template.</p>
  
  <pre><code>@(sourceCodeFileName: Option[String])
  @{sourceCodeFileName match {
      case Some(sourceCode) =&gt; {
          @sourcecode.sourceCodeFileName + "scala.html"
      }
  }}
  </code></pre>
  
  <p>Where sourcecode is the package where the actual template resides. For example., if the String parameter to the above template is given as myview, then I want to include myview.scala.html. Is there a way to do this in Play framework? </p>