How to refer images which are in liferay theme in portlet's css -


i have liferay theme has application level images. portlet own css.

how can refer images in theme portlet's css?

i believe css files can't (at least couldn't think of way this). however, if expect styled theme anyway, can have <div class="hasmydesiredimage"> , make theme(s) contain theme-css use images theme itself:

e.g. custom.css:

 .hasmydesiredimage {     background: url(../images/my/fancyimage.png);  } 

if want address theme-based image portlet (where code dynamically processed) can use themedisplay.getpaththemeimages():


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -