Skip to content

Instantly share code, notes, and snippets.

@jstrachan
Created January 22, 2010 14:42
Show Gist options
  • Save jstrachan/283796 to your computer and use it in GitHub Desktop.
Save jstrachan/283796 to your computer and use it in GitHub Desktop.
class MyTemplates {
@template("foo.ssp")
def cheese(arg1: Arg1, arg2: Arg2) : Unit
}
@templateDir("/foo/bar", ext=".ssp")
class MyTemplates {
// invokes /foo/bar/foo.ssp
def foo(arg1: Arg1, arg2: Arg2) : Unit
// invokes /foo/bar/bar.ssp
def bar(arg1: Arg1, arg2: Arg2) : Unit
}
object Cheese {
// force this to happen on startup
val myTemplates = PageContext.resolveTemplates(classOf[MyTemplates])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment