Created
February 11, 2012 21:33
-
-
Save padcom/1804399 to your computer and use it in GitHub Desktop.
Grails tag library providing tag to link CSS files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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