掲示板

Image from resources - Liferay DXP

thumbnail
7年前 に Gustavo Oliveira によって更新されました。

Image from resources - Liferay DXP

Junior Member 投稿: 98 参加年月日: 15/09/23 最新の投稿
Anyone found a way to reference an image from resources in a xhtml? Cant find a way to reference images from JSF resources, Im uploading images on Documents and Libraries to use.
thumbnail
7年前 に Kyle Joseph Stiemann によって更新されました。

RE: Image from resources - Liferay DXP

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Hi Gustavo,
Please take a look at the portlet:resourceURL, h:graphicImage, and alloy:image examples. If you want to show an image from src/main/webapp/resources, you can use the pattern from these examples. To show an image from Documents and Media, I think you should be able to use DLUtil.getImagePreviewURL() in combination with h:graphicImage, alloy:image or a plain html img tag.
- Kyle
thumbnail
7年前 に Gustavo Oliveira によって更新されました。

RE: Image from resources - Liferay DXP

Junior Member 投稿: 98 参加年月日: 15/09/23 最新の投稿
Hey Kile, is it working for you? portlet:resourceURL, h:graphicImage, or alloy:image?

It worked on 6.2, but its now working on 7. Im using the last patched version.
thumbnail
7年前 に Kyle Joseph Stiemann によって更新されました。

RE: Image from resources - Liferay DXP

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Hi Gustavo,
Please post the shortest, simplest code that reproduces your issue. Please also include the versions of Liferay, Liferay Faces, and any component suites that you are using. The showcase links that I provided are running on Liferay 7, so everything should be working correctly.

- Kyle