gooser
gooser

Reputation: 363

Play framework 2.0 template parameters import

I have the following problem:

Let's say my template parameter looks something like this:

@(variable : really.super.extremely.long.package.name.ClassName)

Is there anyway to just import that Class so that I can reduce it to something like this:

@(variable : ClassName)

Upvotes: 16

Views: 3057

Answers (2)

Just wanted to chime in and say that the above example by @Jeff LaJoie still works under Play 2.2.3

In your build.sbt

templatesImport += "really.super.exteremely.long.package.name._"

or

templatesImport ++= Seq( "really.super.exteremely.long.package.name._", "another.really.super.exteremely.long.package.name._" )

Upvotes: 1

Jeff LaJoie
Jeff LaJoie

Reputation: 1725

I believe it would be in your project/Build.scala file.

In your main

      templatesImport += "really.super.exteremely.long.package.name._"

Upvotes: 14

Related Questions