To inject HTML from a static file to a scala template, you can define a function in your template:
@import scala.io.Source
@injectHtmlFromFile(sourceCodeFilename: String) = { @{
Html(Source.fromFile("static/html/" + sourceCodeFilename + ".html").mkString)
}}
…and call it later in the template this way:
@injectHtmlFromFile(sourceCode.sourceCodeFileName)
Side note
I'm not sure I quite understand the question – I've answered the OP's comment and the same question posted by him on Google Groups.