Skip to content

Instantly share code, notes, and snippets.

@padcom
Created February 11, 2012 21:33
Show Gist options
  • Save padcom/1804399 to your computer and use it in GitHub Desktop.
Save padcom/1804399 to your computer and use it in GitHub Desktop.
Grails tag library providing tag to link CSS files
class StylesTagLib {
static namespace = "g"
def stylesheet = { args, body ->
out << """<link rel="stylesheet" href="${resource(dir: 'css', file: args.href)}" type="text/css"/>"""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment