Asset tag on grails 2.4.0 -



Asset tag on grails 2.4.0 -

i started new grails project on version 2.4.0. in version, subfolder asset has been added in grails-app folder, in order easy access js, css, images, etc.

however, can't access subfolder, example, got folder construction this:

grails-app/assets/stylesheets/fonts/font.css

then when utilize <asset:stylesheet src="font.css"/> (note font.css set in stylesheets folder)

but when tried this, font.css not found.

<asset:stylesheet src="/fonts/font.css"/>

please suggest way access subfolder using asset tag.

don't straight link sub folder. utilize application.css in grails-app/assets/stylesheets.

within application.css tell asset plugin include font.css adding following:

/* * manifest file that'll compiled application.css, include files * listed below. * * css file within directory can referenced here using relative path. * * you're free add together application-wide styles file , they'll appear @ top of * compiled file, it's improve create new file per style scope. * *= require fonts/font.css *= require self */

within layout (gsp) utilize application.css this.

<asset:stylesheet src="application.css"/>

this solve issue.

grails

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -