Is there a good way to robustly link to an image in CSS in grails? Originally, I had image paths set to /images/blah
, which worked great until the application needed to be deployed in a different context.
Is there a better way to link to images than manually specifying the path to the images relative to the css file? This leaves me with crap like ../../../images/blah
, which breaks as soon as the CSS file moves unle开发者_Go百科ss you move the file within a smart IDE. This is also ugly as hell.
You can try using Grails tag libraries with the GSParse plugin to have css and js parsed as a gsp file:
http://nerderg.com/GSParse
http://grails.org/plugin/gsp-arse
精彩评论